Proposal: expression mode (=)
renyongxu at gmail.com
Mon Oct 31 03:35:10 UTC 2016
For supporting label, yes that is kinda a problem.
However, IMO jumping around labels is an anti-pattern in functional
programming, I don't think it needs to be supported. Syntax error might be
the most reasonable way in this case.
for 'match', while it is just some thought. I wasn't intended to proposal
it but just showing potential of extending `= expression`.
Personally I do not think label would be a problem for implementing this
here are two possible solutions I can think of:
1. If `[name]:` exist inside the block, just parse it as object and throw
error if the structure doesn't match.
2. If `[label]:` does exist inside the block, only allow in scope jump.
(label not accessible outside the scope)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss