Draco-lang / Language-suggestions

Collecting ideas for a new .NET language that could replace C#
75 stars 5 forks source link

Pipe operators #135

Open StrajnarFilip opened 1 month ago

StrajnarFilip commented 1 month ago

It's not really something Kotlin has, but regardless, forward pipe operator |> and backward pipe operator <| like in F# might be a great addition.

LPeter1997 commented 1 month ago

I generally agree that the pipe operators are very useful, would be great to see them in the language. They might even be the excuse we need to get rid of extension methods. To avoid the ASCII soup of |>, ||> and |||>, we might want to introduce 2 flavors of the operators, one that splats the tuple and one that does not.