5 ms·
Even Rust and F#[1] don't have (generalized) do notation, what makes it remotely relevant to a decidedly non-ML-esque language like Go? [1] Okay fine, you can
by platinumrad 1y ago
Even Rust and F#[1] don't have (generalized) do notation, what makes it remotely relevant to a decidedly non-ML-esque language like Go?
[1] Okay fine, you can fake it with enough SRTPs, but Don Syme will come and burn your house down.
- evntdrvn 1y agohahaha :D
- nine_k 1y agoIDK, Python was fine grabbing list comprehensions from Haskell, yield and coroutines from, say, Modula-2, the walrus operator from, say, C, large swaths from Smalltalk, etc. It does not matter if the languages are related; what matters is whether you can make a feature / approach fit the rest of the language.
- platinumrad 1y agoGeneralized do notation as GP is proposing requires HKT. I don't think it's controversial to say that Go will not be getting HKT.
- pjmlp 1y agoThe := is from Pascal, not C.
- ablob 1y agoAfaik the F# supports do notation through computation expressions.
- platinumrad 1y agoLike Rust, F# doesn't have higher-kinded types so it's not generalized like GP is proposing. Each type of computation expression is tied to a specific monad/applicative.