Comments (1)
re: #5
{{{
namespace B { void f(); }
namespace N;
using namespace B; # injects B.* into search path
f(); # Calls B::f
using V::W::x; # Declares x, as it is, in current scope.
say(x.name);
using namespace A { # This declares 't', 'u' in current block, not into A,
using t; # because (1) they're already in A, duh, and (2) A is read-only in
using u; # the search path - declarations go into N.
}
say(t + u); # Prints A::t + A::u
f(x.height + u); # Calls B::f with sum of V::W::x.height and A::u
namespace F = C::D::E; # Sets namespace alias
say(F::oo); # Prints C::D::E::oo.
Original comment by [email protected]
on 9 Jul 2009 at 11:47
from close.
Related Issues (20)
- Add 'new <expr>' support
- Add function-pointer support
- Move local variable declarations to start of block, replace initialization with assignment HOT 1
- Add parent-class support HOT 1
- Determine order-of-evaluation for global code
- Add 'find_method' and 'call_method' builtins
- Add key support for arrays
- Add 'split' builtin HOT 1
- Revise wiki intro HOT 2
- Class block does not store initialization code in init_class or init_namespace HOT 1
- Add support for typed literals
- Init code in namespace blocks not working right
- Global symbol for class protoobject not visible within class body
- extern [ :: parrotname ] not parsed correctly
- Add template support
- Add alias mechanism for strangely named symbols.
- Add run-time 'import' statement.
- Add reference/dereference ops for functions.
- Add support for dynamic class/function/method/symbol names.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from close.