help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speeding up Emacs load time


From: Juanma Barranquero
Subject: Re: Speeding up Emacs load time
Date: Wed, 17 Jul 2013 11:31:27 +0200

On Wed, Jul 17, 2013 at 10:30 AM, Emanuel Berg <embe8573@student.uu.se> wrote:

> Yes, it is. Chess is straightforward but no one knows everything
> about chess. (I don't play chess.)

Chess *rules* are straightforward. Go rules even more. You can learn
the rules in five minutes. They lead to non-trivial complexity.

C++ "rules" are not straightforward. No one can learn its "rules"
without many hours of careful reading of the standard, and even so,
it's likely you'll have to go back and re-read many fragments. And
then you'll have to experiment with different implementations to see
whether they did interpret the standard in exactly the same way
(usually that's not the case). Not to mention things that are
explicitly left undefined or up to the implementor.

That happens with all programming languages, of course. But not all
programming languages are equally complex. I love Ada, and I think it
is a much better language than C++ (no language flamewars, please, I'm
just stating my opinion but I have no desire to defend it), but I
wouldn't call Ada "straightforward". Looking at defect reports (of C++
or Ada) destroys that illusion quite fast.

> C++ is C and OO. C is straightforward. OO is straightforward
> unless you make it complicated with insane levels of inheritance,
> overloading, etc. If you don't, and I think you shouldn't, OO is
> straightforward.

That's not an argument in favor of C++, which does make inheritance
model complicated by insisting in having multiple inheritance of
implementation (as opposed to interface).

And you leave out the infamous C++ template system, so complex and
bizarre that it is, by itself, a Turing-complete functional language.

> That only C++ is understood by five people around the globe (you
> didn't say this, I know) is lunacy. C++ was the big thing in the
> 90's, and it is still huge. They rewrote fully functional C
> programs in C++, just to be able to tell "it's C++, it's
> OO". While that was silly, more than five people were *not* silly
> at the same time, I *triple guarantee* all readers of this post.

You're right, that's not what I'm saying. I'm saying that C++ is not
straightforward, not that it cannot be used for real, successful
projects. Of course it can. But the kind of bugs that appear in C++
programs (many of them related to exceptions, for example),
demonstrate how easy is to fall victim of C++ pitfalls and complexity.

    J



reply via email to

[Prev in Thread] Current Thread [Next in Thread]