Hi all
First thing I need to ask is: what is going on with lambdas? They are sprinkled throughout the tutorial, without ever actually being formally introduced, but \... ->...
seems essentially equivalent to |...| ...
/ |...| {...}
; I'm not sure if one form is newer and becoming normalised, or if there are different use-cases for them.
Secondly, there does seem to be a move to make List
concatenation simpler with ..
spread syntax, but (coming from a JS background), my impulse is that this should be unified with the record-making syntax &
.
Thirdly, I like that many infix operators are just syntax sugar for functions. Are there any plans for making custom operators? (EDIT: found some pushback against that idea, which, fair enough :-D )
Or, perhaps, converting from operators back to their functions? The pipe operator already does the converse (Num(a,b) == a / b == a |> Num.div b
), which is like the use of backticks in Haskell. First thought is: Num.div
could be same as (/)
: Num.div(a,b) == (/)(a,b)
Oh, and fourth, sorry: I have been bouncing off the docs for the RecordBuilder
, with its <-
syntax. And I just remembered that the language used to have 'backpassing' with the same operator. Is this backpassing, or something else?
First thing I need to ask is: what is going on with lambdas?
The old syntax was \
and the new is |..|
Are there any plans for making custom operators?
The plan is to remove Abilities in favour of Static Dispatch -- so we have implicit interfaces and the operators are just sugar for those. I'll dig out the thread and link it here.
Is this backpassing, or something else?
It's just the syntax for a building a RecordBuilder. The inspiration came from backpassing operator <-
but unrelated.
there does seem to be a move to make
List
concatenation simpler with..
spread syntax
Have you seen these issues? https://github.com/roc-lang/roc/issues/7091
Maybe that helps you with some additional context?
Last updated: Jul 06 2025 at 12:14 UTC