4 ms·
From the top of my head I would do 2 features no other language (to wit) has: - request reordering arguments to find a match for when you don't remember the ri
by TheMonarchist 5y ago
From the top of my head I would do 2 features no other language (to wit) has:
- request reordering arguments to find a match for when you don't remember the right order. I think this is better than named parameters and other hacks.
- The very opposite of Python: non-printing characters are skipped and won't affect anything. This requires dedicating a character to the separation of tokens. I think comma could be used. I would also use parentheses for grouping tokens.
Edit: Forgot that HN wants empty line to respect '\n'.
- mcphage 5y ago> find a match for when you don't remember the right order How would it distinguish between two parameters of the same time? For instance, atan2 is often in the order (y, x), even though in pretty much every other circumstance, coordinates are given in the order (x, y). Would your feature be able to handle that?
- rich_sasha 5y agoI guess it should try all possibilities until it finds the Right Answer?
- TheMonarchist 5y agoI would either disallow using it when two parameters have same type, or assume that their order is irrelevant: using the feature promises that it won't make a difference. Edit: Found terser expression.
- Ginden 5y ago> - request reordering arguments to find a match for when you don't remember the right order. I think this is better than named parameters and other hacks. It should be implemented at tooling (IDE) level. Otherwise, it would be just source of confusion.
- TheMonarchist 5y agoOf course it should have distinctive look compared to a call where order matters, but I actually like your idea as it would require reordering just once. I think the order should be fixed in the source code too.