Remix.run Logo
pbalau 7 hours ago

Is it hidden if it's explained in the standard?

I think Linus's complain was before there was a c++ standard. An updated version of the complaint would be "this shit is doing too much".

aw1621107 7 hours ago | parent | next [-]

> Is it hidden if it's explained in the standard?

In the context of that particular complaint, yes. From what I understand the gist of it is basically that you should be able to tell what is going on by looking at the code locally (i.e., the code is "explicit").

> I think Linus's complain was before there was a c++ standard.

These emails [0]? IIRC those are the most well-known ones and they are from the mid-2000s

[0]: https://harmful.cat-v.org/software/c++/linus

andrepd 7 hours ago | parent | prev [-]

An empty loop, under some non-obvious conditions, on some compiler flags but not others, silently transforms into a system call. In a systems programming language.

WalterBright 3 hours ago | parent [-]

I try to minimize use of destructors for the same reason.

andrepd 2 hours ago | parent [-]

Destructors run predictably at list, and are pervasive everywhere. You know that when you exit a scope, be that a function or whatever it may, the destructors of variables in that scope are called. That is clear and consistent. The transformation mentioned above is not.

WalterBright 2 hours ago | parent [-]

Understanding the code requires understanding the destructors of the objects you're using. Since they are invisibly inserted, they are a source difficulty in entirely understanding the code.

rcxdude an hour ago | parent [-]

I do wonder if any of the language servers that insert implied type annotations would ever also show things like destructor calls in a similar manner. It seems like it would be quite useful.