Quote:
Originally Posted by Codein
The thing is in other scripting languages, such as PHP, keywords are used and work fine and I actually PREFER them. It makes it much much clearer to see how certain variables are declared and how they should be used, looking through a script. That, COUPLED with the convention, it's a winner, in my opinion.
|
PHP is not used the way GScript is, Graal is a constantly changing environment and GScript is equipped to deal with it dynamically.
Quote:
Originally Posted by Codein
Can you explain how Graal is TOO dynamic for keywords? How have you come to that conclusion?
|
Objects and their variables are often serialized and deserialized as "varname=value". This format is not equipped for specifying the access level of variables. If the access level was dependent on the variable name, no changes would be required for any of this.
Quote:
Originally Posted by Codein
Aye, you're not a miracle worker. It also disppoints me to hear your lack of consideration and interest in up and coming scripters.
|
I'd be more interested if Graal was actually updated with the variety of features scripters have been suggesting for months and years.
Quote:
Originally Posted by Codein
Overestimating your influence? You've had influence over MANY a scripter. Maybe you're blind to this, because of your lack of consideration for new scripting talent, maybe?
|
Ever since I moved on into the world of C/C++, Python, and Lua I've grown to dislike GScript because of its inconsistency among other things. It doesn't inspire me to help with new scripting talent or such things.
Quote:
Originally Posted by Codein
I don't think taking a forced approach is the best way. Many scripters, after a while of scripting, explore other languages. They need to learn that, although optional, convention is still important.
|
Convention can be taught with other means rather than with something so important as private variables.
Let's break it down:
To implement my suggestion, Stefan would need to implement a fix to the variable set and get functions in Graal so that if you're getting a variable that starts with __ from something other then yourself then you get denied.
To implement your suggestion, Stefan would need to modify the compiler to recognize variable access keywords, add functions for getting the access level from variables. Since I doubt changes would be done to save file format, you would only be able to load private variables into an object if the variable already exists and has been declared private, or you could possibly set a private prefix for the load function, which ends up doing what my suggestion would do automatically. And depending on how it's done, all objects would have an increased (minor) memory footprint so variables can store their access level. If you want to avoid that then you'd need an array or hash table of private variable names which would just make variable access slower.