logoalt Hacker News

platinumradlast Tuesday at 8:37 PM3 repliesview on HN

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.


Replies

nine_klast Tuesday at 10:52 PM

IDK, 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.

show 2 replies
abloblast Wednesday at 6:15 AM

Afaik the F# supports do notation through computation expressions.

show 1 reply
evntdrvnlast Tuesday at 9:44 PM

hahaha :D