[llvm-dev] unable to compile llvm with gcc 4.7.4

Sylvain BERTRAND via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 19 03:17:30 PDT 2016


On Tue, Oct 18, 2016 at 10:54:31AM +0100, Renato Golin wrote:
> > Not to mention the sick attitude of many c++ developers which is to maximize the
> > complexity of their object oriented design because they think it makes them
> > smart.
> 
> C++, Perl, Python, Haskell, Ocaml... and I have to say, C programmers
> as well. The amount of hackery I've seen in C programs by so called
> "smart guys" is astounding.

This is what I'm saying: the c++ ultra complex syntax and infrastructure
technical cost, both makes way more damage than
simpler syntax languages. More over c++ is "building" more people with this
attitude because of c++ complex syntax _in itself_. The main issue it c++ being
c++.

> > Currently mesa glsl compiler is based on llvm for AMD gpu. That's why I'm
> > looking at integrating llvm.
> 
> Ah! This explains it! Honestly, I'd go back to the mesa guys and check
> to see if there is any other back-end that you can use.

No, you cannot, their glsl infrastructure for AMD GPUs is based on c++ and
llvm, and from my perspective, is not something to be proud of, as you can guess.
(on the side, I'm not found of the DRM in the linux kernel either, even though
I'm siding with Linus T. for his views on the problem which is c++).

> I think most of us understand these problems quite well, and we try
> very hard to not fall into the fallacy of language power. We're
> constantly refactoring our data structures and algorithms to make them
> easier to understand as well as faster and more reliable, so you got
> the right crowd here.
> 
> However, C++14 has brought a lot of simplicity to the convoluted
> C++98, and has made it a much simpler, saner language, and that's why
> we're so keen on moving on. Not because it's a cool toy, but because
> it makes the code simpler to read and maintain.

This is where the fallacy is: c++ compiler/runtime (any version) ultra costly
dependency and its other issues do not balance any gain brought by its syntax.
Most of the time it ends up to be saner to write a bit more code in simpler
languages than paying the cost of such a dependency. More over the reasonabl
syntax "helps" a lot to put some straps on the developer ability to produce
obscure design.
If really a specific language design could have help massively at writting
compiler infrastrutures (taylored for it), at least, that specific language
should be bootstrapable, in a reasonable maner, with basic C compilers. vala is
a good example, with taylorisation for gobject. But where vala compiler/runtime
has the decency to compile with a basic C compiler and has a simple ABI, modern
c++ compilers/infrastrures (c++XX>98) do fail dramaticaly.

> But that's not going to save your day. :/

Indeed, but at least, I hope I did open some eyes on this very serious issue. 

regards,

-- 
Sylvain


More information about the llvm-dev mailing list