Skip to content

Comment on Monads, or Programmable Semicolons (2014)

Comments

Monads are not "Programmable Semicolons". I understand the thinking behind the statement but it really does a disservice to people who doesn't know Monads using those kind of analogies.

I think it's a very good analogy. "What happens to control and data" between statements, expressions, and function calls is not taught in depth in a lot of undergraduate CS programs because it's usually handled automatically, and always one way. With monads, this stuff (which all falls under the rubric of composition) opens up to programmer control. So that's why I think the analogy is apt.

Maybe “semicolons are hard-coded monads” is a better phrasing?

Yeah that is definitely more accurate.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.