ozra / onyx-lang

The Onyx Programming Language
Other
95 stars 5 forks source link

Feature: spread operator #89

Open stugol opened 8 years ago

stugol commented 8 years ago

Suggest a "spread operator" like in Groovy. It would make things like stuff.map(~.downcase) less ugly.

ozra commented 8 years ago

Interesting, will sleep on it!

ozra commented 8 years ago

Just doing some quick stats, map is used about 200 times in the entire stdlib+compiler code-base (just to have some reference). In scripting-style code it might (should) be used more, percentage wise, and it's good if it's swiftly available then. I think this might end up in Onyx, but it needs some more sleeping on it (there are higher priorities before, so there's time for that ;-) )

ozra commented 7 years ago

I think this is better left out. The current way to do the above is short, and commonly known. There's no real point in sacrifizing a terse syntactic construct on this, that could be implemented for other uses, or at least minimizes ambiguities if never parsed at all.

Sod-Almighty commented 7 years ago

Shame :(