Comments (3)
Yes, it is mostly text inclusion, and there are no namespaces. Lobster has grown from a much simpler language, and it just never happened, but it should.
There is the private
keyword which removes a function/struct/variable from the global namespace, and makes it only available to the current file. This was I guess the simplest thing to make things workable without namespaces :)
builtin functions tend to use explicit identifier namespacing, e.g. gl_
.
Haven't spent much time thinking what namespaces should look like if they are added. Not a fan of ::
since it is "loud", or "." since it makes it look the same as dereferencing. I like _
, but that clashes with its existing use in identifiers.
from lobster.
I guess include/gui.lobster
is a good example of how currently a library is written with an explicit namespace and private
. It be easy to add a namespace gui
declaration that would achieve the same thing without having to explicitly prepend gui_
to all public functions in that file. Or it could use something other than .
, but that would require changes in all users.
from lobster.
Lobster has namespaces nowadays :) See namespace
in http://aardappel.github.io/lobster/language_reference.html
from lobster.
Related Issues (20)
- Use of anonymous arguments multiple times in an expression causes a name collision HOT 1
- Passing too many arguments to an anonymous function doesn't yield compile time error HOT 3
- Crash due to possible heap use after free HOT 6
- Assertion in debug version of lobster with maybe incorrect code. HOT 2
- SpecializationIsCompatible assertion with implicit type in method parameter. HOT 2
- conv int to float - (float) HOT 1
- UNIX/Linux/Mac/BSD support? HOT 7
- [enhancement] shebang support in lobster scripts HOT 2
- "is" type test not usable with structs. HOT 1
- Only right multiplying float vectors by numerics is allowed HOT 2
- Assertion failure with debug lobster after updating to latest. HOT 3
- Android buld fail HOT 2
- Assertion failure with *= operator HOT 1
- SIGSEGV when function is passed as defult argument HOT 1
- release binaries does not run on some recent ubuntu version HOT 2
- Error when building generated cpp code HOT 2
- Namespace + "import gl" causes an error HOT 4
- Font filter mode not settable? HOT 9
- dictionary.get error? HOT 3
- Fatal application exit when calling function of inherited class HOT 3
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 lobster.