Stream: ideas

Topic: Thought after watching the Language design talk with Jose


view this post on Zulip Krzysztof Skowronek (Jun 10 2025 at 21:51):

So, I just finished https://www.youtube.com/watch?v=yR6oHwPN7cE - great episode, I should be asleep long time ago, but here we are

  1. on static dispatch to functions from outside of the module - I think this is essential. Whatever the syntax ends up being, the lsp should suggest all possible functions that take the type as first argument (even not imported ones, and if chosen just import them), so that after I type my_var. I can see everything.

if the pipe operator stays, maybe just my_string.(|> OtherModule.convert_case(Cases.CamelCase)).lenght ? beak operator? mushroom operator? :D
This doesn't look well with the hours example though

I would still expect being able to type my_string.convert_case, hit enter and get the above - or whatever syntax you land on, including (my_string |> OtherModule.convert_case).

  1. List.map and List.map! - there are two things here, both from C#.
    C# has someList.Select(GetDescription), but when you want to call GetDescriptionFromApi, you have to either change the whole collection type, or use a while loop with await somewhere, and that's mostly due to Task (the async promise) being hot - it starts right away.

F# for example (more functional sibling of C#) can do:

let descriptions = myList
      |> List.map (fun x -> x |> getDescriptionFromApi) // getDescriptionFromApi return async, which is cold
      |> Async.Sequential  // runs each async in sequence, there is also Async.Parallel, returns async of list of descriptions
      |> Async.Run // runs the async, so returns list of descriptions

with F# you don't need two separate versions of map, they just return a Task/async thingy. Having to write every method as DoStuff and exact copy of it with awaits as DuStuffAsync, especially if it's a higher order function is one the biggest annoyances in C# and a good argument to use F# instead.

So maybe the answer is to have both Task and ! for effects, but have the Tasks as a lazy thing that an effectfull function can execute? It also makes it super easy to write streaming functions for huge datasets.


Last updated: Jun 16 2026 at 16:19 UTC