News for hackers. Stuff that matters.
Re:Try APL by beagle3 on Friday June 11, 2021 @04:12AM (#27470561)
I think adopting the “each” syntax would help every language that has containers - including Python and C#

It is semantically more like “map” than “foreach”, but syntactically emphasized the applied function rather than the fact that it is applied to the container - and that shows especially when nested - f””x or f”[2]x means “apply at depth two”. Compare that to a nested map/foreach

There are other syntax features I like, but most of them do interact with semantics (some more, some less). This one is useful in any language.

There are no comments on this comment yet.