My criticism is that the syntactic sugar and trying to make it 'look like' a different language actually just obfuscates what's going on and makes things more confusing. e.g. as I undnerstand it
channel { foo[bar] => {
...baz...
} }
Means 'when you receive the token 'foo' from channel, read another value from it, call it bar, then do the stuff inside the braces'. The `foo` and the `=>` are tightly linked; `[bar]` is in-between lexically but logically the order is:
channel { foo => {
channel [bar]
...baz...
} }
i.e. it doesn't make sense to think about the `[bar]` part until after the `=>` has done its job of matching 'foo'.
In the same vein, putting "!" and "?" directly after some other token makes it look those go together, but they are separate things.
caller.empty!
Sends 'empty' to caller, then closes caller. Maybe just writing this with spaces between the parts makes it more clear:
caller .empty !
Parentheses and square brackets are more about what's inside them than what's outside; `.foo` means 'send literal symbol 'foo'', `(foo)` means 'send value named foo', and `[foo]` means 'accept value and call it foo'. All represent operations to be performed on 'the channel in question', but by shoving things together it 'looks like' a method call or something to someone used to looking at C-like languages.
I am mentally putting spaces like that in there as I read through the README.
My criticism is that the syntactic sugar and trying to make it 'look like' a different language actually just obfuscates what's going on and makes things more confusing. e.g. as I undnerstand it
Means 'when you receive the token 'foo' from channel, read another value from it, call it bar, then do the stuff inside the braces'. The `foo` and the `=>` are tightly linked; `[bar]` is in-between lexically but logically the order is: i.e. it doesn't make sense to think about the `[bar]` part until after the `=>` has done its job of matching 'foo'.In the same vein, putting "!" and "?" directly after some other token makes it look those go together, but they are separate things.
Sends 'empty' to caller, then closes caller. Maybe just writing this with spaces between the parts makes it more clear: Parentheses and square brackets are more about what's inside them than what's outside; `.foo` means 'send literal symbol 'foo'', `(foo)` means 'send value named foo', and `[foo]` means 'accept value and call it foo'. All represent operations to be performed on 'the channel in question', but by shoving things together it 'looks like' a method call or something to someone used to looking at C-like languages.I am mentally putting spaces like that in there as I read through the README.
and so on.