4 ms·
> Nobody wanted it. The fact that the C++ standard community has been working on Contracts for nearly a decade is something that by itself automatically refute
by locknitpicker 7mo ago
> Nobody wanted it.
The fact that the C++ standard community has been working on Contracts for nearly a decade is something that by itself automatically refutes your claim.
I understand you want to self-promote, but there is no need to do it at the expense of others. I mean, might it be that your implementation sucked?
- happyweasel 7mo agoIn the early 1990s, C++ had not yet been standardized by ISO, so your argument doesn’t apply to that period.
- vintagedave 7mo agoLate nineties is approaching thirty decades ago; if the C++ committee has now been working on this for nearly a decade, that's fifteen to twenty years of them not working on it. It's quite plausible that contracts simply weren't valued at the time. Also, in my view the committee has been entertaining wider and wider language extensions. In 2016 there was a serious proposal for a graphics API based on (I think) Cairo. My own sense is that it's out of control and the language is just getting stuff added on because it can. Contracts are great as a concept, and it's hard to separate the wild expanse of C++ from the truly useful subset of features. There are several things proposed in the early days of C++ that arguably should be added.
- retsibsi 7mo ago> Late nineties is approaching thirty decades ago Boy, this makes me feel old... oh wait :) (I agree with your point; early 90s vs. mid-10s are two very different worlds, in this context.)
- vintagedave 7mo agoWow. It’s such a funny typo I wouldn’t correct it now even if I was still able to edit. So what was it like back in the Egyptian age? :)
- germandiago 7mo agoI am not sure what the "truly useful features are" if you take into account that C++ goes from games to servers to embedded, audio, heterogeneous programming, some GUI frameworks, real-time systems (hard real-time) and some more. I would say some of the features that are truly useful in some niches are les s imoortant in others and viceversa.
- deleted 7mo ago[deleted]
- sidkshatriya 7mo ago> I understand you want to self-promote Not a very fair assumption. However, even if your not so friendly point was even true, I'd like people who have invented popular languages to "self-promote" more (here dlang). It is great to get comments on HN from people who have actually achieved something nice !
- WalterBright 7mo ago35 years is a lot longer than a decade. C++ should have copied the '= void;' syntax, too!
- Defletter 7mo agoIt should copy Zig's '= undefined;' instead of D's '= void;' The latter is very confusing: why have a keyword that means nothing, but also anything? This is a pretty common flaw within D, see also: static.
- WalterBright 7mo agoNobody in D was confused by `= void;`. People understood it immediately. > why have a keyword that means nothing, but also anything? googling void: "A void is a space containing nothing, a feeling of utter emptiness, or a legal nullity, representing a state of absolute vacancy or lack." Sounds perfect!
- Defletter 7mo ago"People" doesn't include me then. I had no idea that D had this feature for quite some time, despite using it fairly often in Zig, because when considering what the equivalent would be to search for, my brain somehow didn't make the leap to the keyword that represents literally nothing. Or as your Google search result says, "representing a state of absolute vacancy or lack." A less inappropriate use of "= void;" would be to zero-out something. I honestly find D's continual misuse of keywords like this to be really off putting and a contributing factor as to why I've stopped using it.