3 ms·
> Are they too difficult to implement in compilers/interpreters? No, not really. You just have to be aware of them, decide that you want to implement them, the
by Joker_vD 3y ago
> Are they too difficult to implement in compilers/interpreters?
No, not really. You just have to be aware of them, decide that you want to implement them, then sit down and implement them.
For numeric literals with underscores the implementation is rather trivial, you fiddle a bit with the lexer to make it skip the underscores during the text consumption and value conversion.
For named arguments the main problem is not in the implementation itself, it's deciding on what semantics you want when you mix named and positional parameters: e.g. if you have f(a,b,c) then what does f(1, 2, a=3) or f(c=1, 2, 3) or f(b=2, 3, a=1) mean?