9 ms·
If more people knew how to write compilers, is it likely that programming languages will be better?
by xjia 12y ago
If more people knew how to write compilers, is it likely that programming languages will be better?
- sanxiyn 12y agoIn my opinion, no. Programming language progress is bottlenecked on adoption, and then language design. Implementation is not a bottleneck.
- yoklov 12y agoThat's true, but more people thinking about a problem makes breakthroughs more likely.
- frozenport 12y ago>>Implementation is not a bottleneck. Lets not forget what comes first. C++11 adoption was held back a few years because MSVC didn't have support for those features.
- pjmlp 12y agoYeah right, as if the embedded compiler vendors, mainframe compilers and commercial UNIXes (AIX, HP-UX, ...) are all 100% C++11 now. Or worse, as if most IT departments are allowing the use of C++11 compilers in corporate environments.
- robzyb 12y agoCompilier design and programming language design are two very diffierent things. Perhaps someone could even make the argument that a programming language is BEST designed by someone who doesn't know how to make a compiler? The choices for a programming language should purely be based on the language, and on the user experience. In the design phase no thought will be given to compiler design (initially) and all of that will eventually be hiddden as implementaiton details.
- yoklov 12y agoLong compile times are bad user experience, and language design influences this. Performance is also extremely important for language ux, and there are certainly constructs that will prevent your language from ever being efficient. Someone completely unfamiliar with compiler design could easily add these to the language on features that are simply not worth it, even in his or her own eyes. Besides, have you ever looked back on something and said 'Gee, I wish I knew less about this when I started'
- robzyb 12y agoI understand your point. Perhaps I went a bit too gung-ho with my POV. I'd note, though, that long compile times shouldn't be too dependant on language design, should it? I feel that an argument could be made that if a programming language is well defined, then a well written compiler could be well thought out and designed around it. Of course, I'm sure that there are counterpoints. I'm sure that there are languages for which it is very difficult to write a "fast" compiled. > Besides, have you ever looked back on something and said 'Gee, I wish I knew less about this when I started' Actually, I kind of have. Experts (for lack of a better term) sometimes make their solutions more complicated than they need to be, and this is partly because they have the knowledge to do that.
- pjc50 12y agoC and C++'s system of macros by textual inclusion and approach to "compilation units" means that virtually all large C++ projects end up having multi-hour compile times.
- userbinator 12y agoExperts (for lack of a better term) sometimes make their solutions more complicated than they need to be, and this is partly because they have the knowledge to do that. I think that's caused by a slightly different effect - not considering essential and incidental complexity. It is true that for some programmers, the urge to put in as many things as they know tends to override the more basic goal of solving the problem in the most direct way.
- jcranmer 12y agoProbably not. The people who design programming languages (at least, those who do it for more than hobby purposes) are almost certainly reasonable skilled and knowledgeable in compilers already.
- rtpg 12y agoThis might be true for general purpose languages, but as a data point Django's templates suffer immensely by the implementers being unaware of how to write a fast compiler/interpreter.
- spullara 12y agoThis is true. Getting the performance that I do from mustache.java has a lot to do with using JIT techniques.
- obstinate 12y agoHowever, there are plenty of people who know how to write compilers. The question is why they weren't involved in making Django templates?
- chii 12y agobecause it's a relatively boring and uninteresting problem? The intersection of people who find a particular niche problem and also knows how to do parsing, compiling and optimizing well is pretty small.
- rtpg 12y agoWell when Django started out it was this small project for web developers, right? Anecdotally, I've found the compiler people universe and the web developer universe to be pretty disjoint for a long time.
- mseri 12y agoI think they would be happy is somebody points them in the right direction. Do you have any specific comment or suggestion?
- sliverstorm 12y agoYou might be able to argue that if more people knew how to write compilers, they would write better code.
- vidarh 12y agoAt least people ought to know how common language features tends to be compiled. Understanding that can have a huge impact on how you write code.
- static_noise 12y agoProbably. The more people you throw at a problem the more likely it will be that someone finds a good solution.
- deleted 12y ago[deleted]