-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language questions #54
Comments
An idea would be allow only those statements:
Also I do like |
These are 4 ways of doing 4 different things:
Lexical functions are essentially private to the body of the class unless they're defined with a qualified name (i.e. function foo::bar() end). So replacing method declarations with There was a long discussion about this during the design of JS Harmony's classes. The eventually decided against them. I prefer to have them, because it gives you a private scope. |
Just a note on the context thing... my feeling is that things which are different should look different. Using The same goes for
|
regarding |
How I can recreate this from the outside:
|
Note that the
|
|
So here the question, other than compatibility with Lua, does shine needs static_methods? Here why, from my ruby OO I'll do:
|
What makes Also, Shine doesn't have static methods really. Everything is a table. Including the What I don't want to lose are lexical functions. (sorry about the edits, can't type today) |
Actually the only declarations which are special in any way are method declarations:
Because I really don't want to be typing |
mmm, I'm a bit confused. I need to think a bit more about it, from my understand seems Shine can live just with:
|
Well, yes it could (you'd say
Because what's really happening is |
And don't forget the
|
Just to close this thread, everything you're suggesting, I've already tried. Here are all my attempts at creating a language on the Lua VM:
So I really have put some thought into it and tried to incorporate all the things I've learned. It's not perfect, no language is, but it's the best set of compromises I can find while still keeping Lua's semantics and performance. |
Oki, I see. Thanks a lot for discussing it. Appreciated! |
Always happy to discuss. Thanks to you for challenging me! |
Actually, you've got me thinking now :) |
If I can solve this ambiguity then I'll consider it:
|
Hmm... the only way I can see for that to be sane is to either go the Ruby way where everything is an object (so |
I'm I think I have no know-how here to help you more but I'm not for a Ruby way which I think could add complexity. |
I hope is the last, maybe we should setup a chan on freenode.
My questions:
self
and notinit
,initialize
orconstructor
? I'm aware that is not a real constructor butself
is a bit confusing when then you call "methods"self.x
...Shine
context free? I mean, there are different ways to create functions but do you think is possible to have just one?We have:
So we have 3/4 forms to create functions, what I love of langs like
go
is that they haveone way
to do things, and the community love (even too much :D) this.Thanks!
The text was updated successfully, but these errors were encountered: