LiveScript icon indicating copy to clipboard operation
LiveScript copied to clipboard

New syntax for arguments proposal

Open askucher opened this issue 6 years ago • 5 comments

Currently we have

func = (arg1, arg2, arg3)-->
   ....

or

func = (arg1) -> (arg2, arg3)-->
   ....

I think it is good to have

func = (arg1 | arg2, arg3)-->
   ....

askucher avatar Apr 08 '18 06:04 askucher

I think it would also be good to have

func = (arg{1..3})-->
 ...

Like the range syntax in Haskell, to avoid having to write arg1, arg2, arg3. It's a waste of characters methinks.

hmaurer avatar Apr 12 '18 22:04 hmaurer

@hmaurer, if this is a serious proposal, would you create a new issue for it please? (Also, do you know about &0, &1, etc.?)

rhendric avatar Apr 12 '18 22:04 rhendric

@rhendric Sorry, I was trolling 🙄

hmaurer avatar Apr 12 '18 23:04 hmaurer

:dart: You got me!

(For the future, though, please don't; given the quality of ideas that get proposed around here sometimes, I kind of have to assume that they're all sincere.)

rhendric avatar Apr 12 '18 23:04 rhendric

I don't understand what is the objective of this proposal. Is for currying some arguments ?

danielo515 avatar Jan 02 '19 15:01 danielo515