How would it look now? In order to do a comparison, that is needed.. With only my side of the example, there is no way to know which is better. Also, you didn't use spaces which would help readability a lot with wordy parameters.
I would think at the very least it could look like this, but would need to see how it's actually used to translate into the new syntax
Parameters only need to be as long as necessary to contextually form the word in the persons brain, similar to how "burger" in English can be used to mean "hamburger", the context fills in the blank, like "param" in context will read as "parameter" or "val" in context of a programming language, inside a function, inside a dllfunction, will be contextually read as "value". This would save typing and also increase readability speed, see below.
Code: Select all
DllCall(file opengl32.dll, func glVertex3d, param1type Double, param1val x, param2type Double, param2val y, param3type Double, param3val z)
Syntax highlighting would help further increase reading speed, just like it already does in existing editors like Scite4Ahk
Code:
DllCall(file opengl32.dll, func glVertex3d, param1type Double, param1val x, param2type Double, param2val y, param3type Double, param3val z)
Also, for user-defined functions, you can't use them without knowing what parameters you're passing are anyway, and people reading the function don't know what those parameters do without looking in the function, unless they are self explanatory. If they are self explanatory, you don't need a parameter name to prefix that parameter. If they aren't, naming them helps in the proper use of the user-defined function as well as reading the function later to understand what it's doing to some extent without looking in the function.
For example the new function Mouse(), if it was a user-defined function, has the option to Click and the option to specify x and y coordinates, from this syntax Mouse(x100,y200,LeftButton Click) we can infer exactly what the function is doing without looking in the function code itself. If we type Mouse() a good IDE like Scite4AHKv2 should look up if that function exists, and display all the possible parameter names like "x" and "y" and "LeftButton", etc. along with the child name options after you type a parent. This isn't needed, it simply avoids having to look inside the function to know the names. The way it is now, you have to either memorize the parameters for functions and what they signify, or look in the function as well, or it's self explanatory and simple (like the math functions). In v2, the self explanatory functions like abs() obviously wouldn't need a parent prefix.