Hacker News new | ask | show | jobs
by pornel 22 days ago
Stroustrup's list of objections sounds quite sensible to me: https://www.stroustrup.com/Contracts_fundamental_flaws.pdf
4 comments

Agreed. I've not liked the contract setup for various reasons. It seems like the proponents of it are mostly there because it scratches an itch in PL PhD studies rather than being an actually useful feature.

I remain unconvinced as why this is a necessary feature over the already existing `assert` statements.

It is currently UB to have assertions enabled in some translation units and not in others. `contract_assert` avoids this. This behaviour seems more than worth it.
> The P2900 contracts failings:

>

> Unimplemented — GCC 16.1 (released 2026-04-30) ships it only as experimental

It will always be experimental before it is standardized, because before standardization the specification could change which means if it was not experimental, GCC had to maintain a standard-incompatible implementation.

Expecting a non-experimental implementation as a requirement for standardization is an impossible goalpost.

At the end, it became very clear that some of the prose came from LLMs. It's a very short survey of other objections. I wonder why he/they reached for an LLM instead of writing it manually.
Because in circles like HN everyone is proudly telling how they burn Claude tokens?
You think Stroustrup's decision making is primarily decided by what's currently hype on HN?
LLM hype is very much stronger than the rest of HN hype.
Nice way to twist my words, I was replying to the usual paradox in HN to hype about LLMs to code, and complain about the same LLMs to write docs.
I don't think I was twisting your words?

    > > I wonder why he/they reached for an LLM instead of writing it manually.
    > Because in circles like HN everyone is proudly
    > telling how they burn Claude tokens?
Or was the "because" not meant to indicate that you're answering the question, were you instead using it as a different rhetorical device? I suppose that could make sense. I think it could've been written a bit more clearly. I really wasn't trying to twist your words.
Because it is now all the hype, and sites like HN is where the more technically minded folks usually hang around.

So more about the hype in itself and less about HN specifically.

I guess I could have added that part as well.

So yeah, I guess I got a bad reply there, sorry about that.

The paper sounds very, very much like Claude
> Not tried in major application domains — no shipping production codebase uses pre/post/contract_assert.

This line is where I realised it's Claude. Also note the emdashes.

Did people not read articles and books with em-dashes before LLMs? Why are we pretending nobody used them before? It's one of the first things people learn to typeset properly when learning LaTeX for the first time, not to mention so many books we grew up reading used them regularly.
I loved em-dashes --- I still do (as you can see, I'm partial to AP style ;)) But most people never understood the difference between hyphens, en-dashes and em-dashes in the first place. Or that The King's English uses en-dashes where US English uses em-dashes. Merriam-Webster has a short and amusing -- to me -- article on this topic [1]. So all kinds of "dashes" are rolled into the "em-dash is an AI tell" hysteria.

That LLMs use them all the time is also a good indicator that there are alot to be found in the training material.

[1] https://www.merriam-webster.com/grammar/how-to-use-and-under...

I routinely use em dashes. They are easy to type on Mac and Linux. Only Windows makes it a hurdle.
Nowadays it's also just Super-(Shift-)Hyphen on MS Windows.
Bjarne uses Microsoft Word (the style used in the document gives it away) and it auto-emdashes by default when you just type a normal -
That doesn't explain why the rest of the words are Claudish.