4 ms·
That is a bit close to pascal. I have think in something similar, but extend the idea: #Naming conventions. ENFORCED BY THE COMPILER by default #For type/clas
by mamcx 12y ago
That is a bit close to pascal. I have think in something similar, but extend the idea:
#Naming conventions. ENFORCED BY THE COMPILER by default
#For type/class/interface
Str #Title-case mean public
_Str #private
___Str #protected
#For functions, properties
isPublic #Camel-Case mean public.
_isPrivate #private
___isProtected #protected
PI = 3.1416 #All CAPS means CONSTANT
I wonder how do mutable vs. inmutable. I have think in:
thisIsInmutable
thisIsMutable*
Because if is only a declaration point (using for example let vs var) but not the rest of the use of the name, you lost the ability to know if the thing mutate or not. The other idea is doing this only for functions:
fun List.Add(self*, values:Array)
Or like in other languages
fun List.Add!(values:Array)
The other idea (derived from the fact the Lexer/AST give far more info than the text) is color-mark the vars and differentiate by color and/or font style between mut/inmutable, functions, types, vars, etc