News for hackers. Stuff that matters.
Re:Survey results: ISO C++ feature proposals by Razengan on Friday July 26, 2019 @10:49AM (#20535196)
Is there a petition for making C++ less ugly? There should be.

It’s a Frankenstein’s monster made of parts from other Frankenstein’s monsters. If Lovecraft were alive today this would be his prime eldritch deity. An abomination of impossible geometries you could not make sense of even if your eyes could see in 4D.

Re:Survey results: ISO C++ feature proposals by alexhutcheson on Friday July 26, 2019 @11:07AM (#20535336)
Backwards compatibility is one of the highest priorities for C++, which is a significant constraint in removing "ugly" constructs and syntax. It can also force the use of verbose or unusual syntax for new features, even if the new features are a net positive for readability.
Re:Survey results: ISO C++ feature proposals by Aardwolf on Friday July 26, 2019 @11:23AM (#20535461)
At least trigraphs have been removed from C++17, so they do what they can to remove ugly constructs within reason for backwards compatibility.
Re:Survey results: ISO C++ feature proposals by ridiculous_fish on Friday July 26, 2019 @01:01PM (#20536278)
A lot of C++ changes are aimed at this. For example C++11 auto removed a lot of the ugliness, and is removing even more with auto template parameters and deduced return types.
Re:Survey results: ISO C++ feature proposals by SloopJon on Friday July 26, 2019 @11:38AM (#20535569)
The "compile-time programming" category of this survey is dominated by constexpr proposals, where constexpr can replace some pretty ugly template metaprogramming.
Re:Survey results: ISO C++ feature proposals by banachtarski on Friday July 26, 2019 @11:05AM (#20535314)
Pattern matching is listed there, but I think the onus is on you to describe what you're talking about. I guarantee that any language (even the HN-beloved Rust and Go) can produce hideous code.
Re:Survey results: ISO C++ feature proposals by Razengan on Friday July 26, 2019 @03:10PM (#20537505)
> the onus is on you to describe what you're talking about.

I'll start with a simple example. I haven't worked with C++ in ages and I hope never to, but in the last C++ file I came across:

Right at the beginning there were 3 different kinds of include/import statements.

One with "" and another with <> and I don't remember what the third was but it had yet another format.

Now, I know what they mean, or I can look it up, and there may be a valid need for the distinction, but it is ugly.

Here's another confusion I was recently reading about:

https://stackoverflow.com/questions/516237/when-should-i-use...

I find Assembly and "pure" C a lot more elegant than this nightmarish atrocity.

Re:Survey results: ISO C++ feature proposals by krisrm on Friday July 26, 2019 @03:14PM (#20537542)
If there's a valid need for the distinction, and it's straightforward (<>s search system libs first vs quotes search CWD first IIRC), what would be less ugly? Keeping in mind the vast number of C++ files out there that have already baked this convention in :)
Re:Survey results: ISO C++ feature proposals by Razengan on Sunday July 28, 2019 @02:02PM (#20548897)
How about using the CLI path resolving convention, where you implicitly look in the CWD first and then the environment path?

Specify specific paths by something like "$SYSTEM\foo.h" or "$CWD\foo.h"

Either would be more readable and less magic than <> or ""

Re:Survey results: ISO C++ feature proposals by poiuyt098 on Friday July 26, 2019 @04:23PM (#20538055)
i find gothic steampunk kinda sexy.
Re:Survey results: ISO C++ feature proposals by ilovecaching on Friday July 26, 2019 @01:07PM (#20536325)
There's already a solution for that: Rust. C++ lives and dies by it's commitment to keep all of its ugly. If you want all of the nice stuff and lessons learned without the cruft, choose Rust.