News for hackers. Stuff that matters.
Re:Try Gleam by adamddev1 on Monday November 09, 2026 @07:48AM (#50424865)
Gleam is really a delightful language with great ideas, but the lack of currying is a tragedy.

Missing currying feels a little to me like walking in FP land with one leg cut off.

Re:Try Gleam by kaoD on Monday November 09, 2026 @08:04AM (#50425036)
[delayed]
Re:Try Gleam by nchagnet on Monday November 09, 2026 @08:11AM (#50425123)
Yes Gleam allows you to do f(arg, _)

See the relevant docs: https://tour.gleam.run/everything/#functions-function-captur...

Re:Try Gleam by riffraff on Monday November 09, 2026 @03:36PM (#50431693)
But that's a single argument right?

Seems more limiting than the closure way. Scala allows multiple _ but in turn that doesn't allow changing ordering.

TBH, I feel this stuff is not really worth it,

Re:Try Gleam by yladiz on Monday November 09, 2026 @04:10PM (#50432201)
I think the single hole version is a good compromise compared to actual currying or multiple holes, since it's strictly better than something like first or last argument threading (e.g. ->, ->> in Clojure), easier to reason about than currying, and in my experience most of the time you'll only be dealing with one argument to pass piping anyway. Anonymous functions are fine for the cases you need more flexibility.
Re:Try Gleam by senderista on Monday November 09, 2026 @01:55PM (#50429889)
Are there any physicists out there who are reminded of abstract index notation for tensors?
Re:Try Gleam by stiiv on Monday November 09, 2026 @08:36AM (#50425410)
A deal breaker, and just when I was starting to get excited!

Plenty of practical reasons for currying, but the biggest (imo) is for use with the pipe operator.

If they don't have partial application now, what are the odds they'll have it in the future?

Re:Try Gleam by nchagnet on Monday November 09, 2026 @08:51AM (#50425579)
As I mentioned in my other comment, they do have partial application with _, and it works like a charm for piping! It's automatic currying which is absent.
Re:Try Gleam by senderista on Monday November 09, 2026 @01:56PM (#50429899)
And that's fine, because currying forces you into impossible tradeoffs when choosing argument order.
Re:Try Gleam by adamddev1 on Monday November 09, 2026 @03:50PM (#50431923)
But Haskell has nice little functions for switching argument order, and people can easily make them in other currying languages.