TodePond / DreamBerd

perfect programming language
https://dreamberd.computer
Other
11.22k stars 344 forks source link

Suggestion: change syntax of method calls to attract web devs #132

Open stohrendorf opened 1 year ago

stohrendorf commented 1 year ago

To ease transition from more complicated and less perfect languages, method calls should look like someMethod?arg1="hello"&arg2="world"&arg3=123!, because everyone is familiar with that notation, and thus understands the behaviour well. Whitespace between the separators must not be allowed, because otherwise the syntax would break with this well-established standard. Strings must be URL-encoded, no matter whether they are written in-line, or whether they come in through variables. Code as arguments (for example, giveMe?number=random()) is not allowed, as this would also break with how URLs work. In fact, everything that's not a valid identifier for a variable is treated as a string. The parameter names don't matter, as the arguments are passed by their position.

Update: the argument's names must match the function definition, yet the order doesn't matter, as the call is only positional.

ThePython10110 commented 2 months ago

The ? character could be misinterpreted as the end of a line.