News for hackers. Stuff that matters.
Re:Parsing C++ is literally undecidable (2013) by choeger on Friday October 04, 2019 @03:41AM (#21155620)
This is one of the major issues with these languages that were initially designed by amateurs (I mean that in the positive sense, someone who does something because they care about it, and not because they are paid to do it). Often they simply did not see the long-term benefit of adhering to the limits of a "standard" architecture (i.e., context-free, unambiguous grammar, decidable static analysis (lookup!), multi-pass implementation). Yet these hackers still made a successful product. Now others must live with the consequences (for another example, have a look at javascript's scoping - I strongly suspect that it was a beginner's mistake that made it into production).

That particular syntactic ambiguity in C++ would have been trivial to fix (and could still be fixed today!), but no one really cares (and it would not be backwards compatible...).

Another example is the current situation with modules in C++. Instead of looking into the diverse ML implementations or even Java and trying to get the system right, the current discussion goes into wild compiler hacks just to avoid a simple limitation on filenames.

Re:Parsing C++ is literally undecidable (2013) by amelius on Friday October 04, 2019 @07:00AM (#21156479)
> This is one of the major issues with these languages that were initially designed by amateurs (I mean that in the positive sense, someone who does something because they care about it, and not because they are paid to do it).

As opposed to a "professional" who is told by their boss to implement X before the end of the day?

Re:Parsing C++ is literally undecidable (2013) by rightbyte on Friday October 04, 2019 @04:00AM (#21155713)
If I remember correctly Stroustrup was working at Bell labs in the initial phases of the cpp design with a formal education in CS. Hardly an amateur? Inexperienced maybe.
Re:Parsing C++ is literally undecidable (2013) by smitty1e on Friday October 04, 2019 @05:17AM (#21156044)
For a random sampling of the internet, being a critic of a complex system is trivial.

Offering an alternative that's an objective improvement, much less, on par with the status quo?

Not so much.

Re:Parsing C++ is literally undecidable (2013) by vkazanov on Friday October 04, 2019 @05:17AM (#21156045)
"Formal education in CS" is not the same as, say, a degree related to programming languages or compilers.
Re:Parsing C++ is literally undecidable (2013) by iainmerrick on Friday October 04, 2019 @06:19AM (#21156280)
Sure it is! A reputable CS degree will cover multiple programming languages and compiler implementation.

I don’t think you could study just “compilers”, say, at undergrad level. Maybe you mean postgrad or postdoc-level qualifications?

It would certainly be a pretty different world if you were only allowed to design a new programming language after getting your PhD in language design.

Re:Parsing C++ is literally undecidable (2013) by coldtea on Friday October 04, 2019 @06:27AM (#21156322)
>Sure it is! A reputable CS degree will cover multiple programming languages and compiler implementation.

Which is neither here, nor there. A reputable CS degree is an all rounder, it's not expertise in PL design and research.

>I don’t think you could study just “compilers”, say, at undergrad level. Maybe you mean postgrad or postdoc-level qualifications?

For starters, yes, but it's not about official qualifications. Someone (e.g. Simon Peyton Jones) could be a PL expert without "official qualification" in the form of such a degree.

Even writing many increasingly successful languages could do it. Starting with your first (or first serious) attempt at a language, however, is not that...

Anders Hejlsberg is another famous example. He didn't complete his university (and it was on Engineering anyway), but after decades of successful work on the field be became a major PL designer and expert.

Stroustrup, however, was hardly anything like that at the time he first designed C++.

Re:Parsing C++ is literally undecidable (2013) by pjmlp on Friday October 04, 2019 @08:19AM (#21156839)
In most European universities CS and Engineering are intermingled.

Pure CS theory tends to be a maths major.

Re:Parsing C++ is literally undecidable (2013) by coldtea on Friday October 04, 2019 @09:03AM (#21157199)
>In most European universities CS and Engineering are intermingled.

Not at the time, when CS didn't even exist in many European universities, or was rudimentary at best.

Re:Parsing C++ is literally undecidable (2013) by pjmlp on Friday October 04, 2019 @11:40AM (#21158721)
You will find plenty of degrees already available during the 70's, almost a decade before C++ came to be.
Re:Parsing C++ is literally undecidable (2013) by tralarpa on Friday October 04, 2019 @05:31AM (#21156097)
Yes. There is a section in one of his books where he wrote that he added some feature in an ad-hoc way just because of a request from a colleague. Unfortunately, as I have already written in another comment some months ago, C++ was the wrong thing that came at the right time (C people were starting looking for alternatives, seeing what cool things other languages were doing).
Re:Parsing C++ is literally undecidable (2013) by tempguy9999 on Friday October 04, 2019 @06:59AM (#21156471)
I think you might mean the 'protected' thing in classes. It was something he regretted later.

IIRC the person who asked for it also regretted that, but I'm less sure on that.

Re:Parsing C++ is literally undecidable (2013) by gpderetta on Friday October 04, 2019 @05:03AM (#21155990)
>Yet these hackers still made a successful product.

Worse is, was and always will be better. It seems that's an unchanging law of software design. Practicality, getting things done and catering to user needs always beats purity, elegance and soundness.

Re:Parsing C++ is literally undecidable (2013) by TeMPOraL on Friday October 04, 2019 @05:18AM (#21156049)
Less rosy view: sacrificing quality to increase adoption or decrease time to market always wins, so on the market, all software moves towards being the worst possible design that's still fit for purpose.

Alternative phrasing: the market runs on greedy optimization, which means a lot of value that could be gained is simply unreachable.

Re:Parsing C++ is literally undecidable (2013) by gpderetta on Friday October 04, 2019 @05:23AM (#21156067)
Definitely.

There is still value in elegant and sound solutions though. Even if inevitably unsuccessful, they will still be influential on the next round of practical hacks.

Re:Parsing C++ is literally undecidable (2013) by skohan on Friday October 04, 2019 @05:20AM (#21156056)
In defense of amateurs, there is also something to be said for the ergonomics which come out of designing a language iteratively, against concrete use-cases, rather than from a purely theoretical direction.
Re:Parsing C++ is literally undecidable (2013) by pjmlp on Friday October 04, 2019 @04:07AM (#21155741)
The problems with modules is not getting the system right, the module proposal owners are well aware how to do it.

The problem was the politcal wars of tons of companies that don't want to let go of their in-house build systems based on translation units just to make use of modules.

So the end result is a compromise to make some of those big names happy.

Re:Parsing C++ is literally undecidable (2013) by einpoklum on Friday October 04, 2019 @09:22AM (#21157369)
Can you give a specific example of something which was "bent up" from its more appropriate standardization to placate those large companies?
Re:Parsing C++ is literally undecidable (2013) by pjmlp on Friday October 04, 2019 @11:46AM (#21158803)
Include headers as modules, aka header units.

Which also brings their macros into scope.

Re:Parsing C++ is literally undecidable (2013) by bigcheesegs on Friday October 04, 2019 @04:33AM (#21155867)
What do you mean by wild compiler hacks?
Re:Parsing C++ is literally undecidable (2013) by choeger on Monday October 07, 2019 @03:21PM (#21184890)
For instance the proposed solution where the compiler becomes a service that blocks compilation of a unit until it has seen all the module dependencies.