Hacker News new | past | comments | ask | show | jobs | submit login

the point is not that there should be no special syntax, but that special syntax in these (functional) languages serves a more generic purpose, and isn't just for async.

Ocaml is actually the worst example because it has always relied on extensions to provide an alternative to Haskell's do notation.

> well, there's a third party library that only recently introduced let*

it won't change how you feel about it but `let*` is an syntax extension (ppx), kinda like babel transform. It has nothing to do with the third party library. What the library provide are async primitives, equivalent of the `q` package in nodejs




I can only quote the sibling comment: https://news.ycombinator.com/item?id=29918575

--- start quote ---

Your point about using "just" is an important one. When you're inside all of that, it seems crystal clear, but for people coming outside of that bubble, it can be quite opaque.

--- end quote ---

So, your original comment, " In OCAML it's just like any other monad you use the bind operator instead. No need for special keywords." quickly devolved into:

- oh, it's not "just a bind operator"

- oh, you need special syntax

- oh, you need a third party library that may or may not have support for that special syntax

So yeah, it's not "just <intellectually superior sounding words>". It never is.

Especially in the context of the conversation which is:

- ReScript

- Requirement to integrate and interoperate with JS and JS libraries that are increasingly Promise-based.


I get it the first time, no need to repeat.

If you read back my comment, at one point I said I only have basic understanding of OCAML, at no point I claim to be an expert. I'm mediocre in programming in general. What I said I said it from the perspective of a javascript developer who don't think that async await is that big a deal, I just happen to know some context regarding functional programming, which, again, isn't the point of view I am taking, since I only have basic knowledge and write javascript at my day job.

With that said, let me put it bluntly, you are being annoying.

If we want to stop talking about programming and start picking on people's tone, let me point out one thing: you are not a mind reader, the way you just pick on a rather common word that people often use casually, and infer that I am asserting my "intellectually superiority", is annoying. Let me remind you this is the Internet where everyone is mostly anonymous. No one cares enough to show off to a bunch of usernames that don't matter to them.

You are right to say that what I claimed to be simple, wasn't simple, but I'm not taking the other nonsense you are accusing me of.


> - oh, it's not "just a bind operator"

It is though, it's a function/operator that is defined in userland.

> - oh, you need special syntax

> - oh, you need a third party library that may or may not have support for that special syntax

No, you don't need either of these things. These just add a convenient syntax that desugars to the aforementioned bind function. These PPXs aren't special keywords specifically for async/await that had to be added into the language's syntax itself. Note that I know nothing about ReScript and this reply is not about ReScript, as that's not what this comment chain is about.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: