|
|
|
|
|
by zX41ZdbW
696 days ago
|
|
The first example is not convincing: lsp\ "prin"
It has two problems:
- it's unclear why "prin", not "print";
- the usage of backslash looks scary.Subsequent examples are also not good: bears .column? 'Area |unique
- overloaded syntax of '.' and '?' characters;
- unbalanced quotes;
- unbalanced whitespace around the '|' characters. |
|
There is a sub-convention that word\ just means like word(more), which usually means one (most obvious) additional argument. function `ls` lists current context and `ls\` accepts string, in this case "prin" and list all arguments that match it.
Rye (similar to Rebol) relies on multiple types of words to replace syntax (if that makes sense) and these types of words are denoted by specific characters at the start or the end usually.
.word is and op-word and takes first argument from the left |word is a pipe-word and is similar to op-word, but with different priority (more on that you can see on the website) 'word is lit-word (literal-word) ... quoted word in lisp terms (I suspect)
? at the end is a convention for "get" ... so noun? would mean get-noun ... so height? is convention for get-height. This is temporary "in testing" convention but so far it seems to function OK.
Thanks for your feedback.