- Joined
- Jul 10, 2007
- Messages
- 6,306
Please fill out this survey.
1. Which style of syntax do you prefer for the preprocessor? Keep in mind that the preprocessor language will be Lua.
2. Which style of syntax do you prefer for OOP?
3. Would it be better to stick with the standard JASS access modifiers of just local and nothing or expand them into public, protected, private, internal, and local, where local is an access modifier that is applied to things with a limited lifetime.
4. Would it be good to add ++, --, +=, /=, -=, *=, even though the set keyword makes this somewhat confusing? Example: set i++
5. Which of the following do you prefer for typecasting?
6. Should only xJASS be in the language? vJASS has a tradition of supporting many languages in only one grammar. Should xJASS only support xJASS? If this is the case, should a vJASS to xJASS translator be written?
7. To support passing arrays around, the array must be copied to a global array and then the global array must be copied to a local array. This is 8192*2 iterations. Is this feature worth the cost?
8. Should delegates be included as a static type that generates a list of ExecuteFunc?
9. Assuming delegates are used, should there be a shortcut for handling pre and post events?
10. Should internal be by trigger/file, by trigger/file/selected scopes, or by trigger/file/selected scopes/selected symbols? If 3 and 4, what sort of syntax should be used to select a scope for internal? That is, when the internal access modifier is used, it can be accessed by anything else within that scope.
1. Which style of syntax do you prefer for the preprocessor? Keep in mind that the preprocessor language will be Lua.
JASS:// preprocessor decorator preprocessor function takes nothing end preprocessor if (...) then end preprocessor while end // generic preprocessor block preprocessor end // $ is used as the interpolate operator // # is never used set x = $preVar + 5
JASS:// # a shortcut for preprocessor only*** #function takes nothing #end #if (...) then #end #while (...) do #end #preprocessor #end
2. Which style of syntax do you prefer for OOP?
JASS:// scope used as a decorator scope type a extends integer endtype // one liner type a extends integer
JASS:type a extends integer // expand type a into a scope using scope merging scope a endscope
JASS:@scope type a extends integer endtype
JASS:expand type a extends integer endtype
If none of the above seems good, please recommend another way.
3. Would it be better to stick with the standard JASS access modifiers of just local and nothing or expand them into public, protected, private, internal, and local, where local is an access modifier that is applied to things with a limited lifetime.
4. Would it be good to add ++, --, +=, /=, -=, *=, even though the set keyword makes this somewhat confusing? Example: set i++
5. Which of the following do you prefer for typecasting?
JASS:(type)var
JASS:type(var)
6. Should only xJASS be in the language? vJASS has a tradition of supporting many languages in only one grammar. Should xJASS only support xJASS? If this is the case, should a vJASS to xJASS translator be written?
7. To support passing arrays around, the array must be copied to a global array and then the global array must be copied to a local array. This is 8192*2 iterations. Is this feature worth the cost?
8. Should delegates be included as a static type that generates a list of ExecuteFunc?
JASS:delegate onPre delegate onInit // initialize libraries that this library may depend upon call onPre() // init code for this library // initialize libraries this depend on this library call onInit()
Use case
JASS:scope A delegate preInit delegate postInit integer unitType = 'hfoo' call preInit() unit b = CreateUnit(...) call postInit() endscope scope A scope LibName delegate preInit delegate postInit endscope private function a takes nothing returns nothing call LibName.preInit() set unitType = 'hpea' call LibName.postInit() endfunction call preInit.register(function a) endscope
If not, how should order of initialization with scopes of the same name be done?
9. Assuming delegates are used, should there be a shortcut for handling pre and post events?
JASS:scope a // if init extends nothing, it is automatically called at the start and end // of the scope initializer init endscope scope a // shorthand for declaring a variable in a scope // if it extends something, it is called at the start/end of every function // that extends init initializer myLib.init extends init private function aa takes nothing returns nothing extends a.init.post endfunction endscope
If the above is done, should delegates still be done, or should this feature only be included? Is the above feature useful and readable?
10. Should internal be by trigger/file, by trigger/file/selected scopes, or by trigger/file/selected scopes/selected symbols? If 3 and 4, what sort of syntax should be used to select a scope for internal? That is, when the internal access modifier is used, it can be accessed by anything else within that scope.
JASS:scope A scope B internal function b takes nothing returns nothing endfunction endscope scope C call B.b() endscope endscope
Last edited: