[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ equivalent to spaghetti code
From: |
terminator |
Subject: |
Re: C++ equivalent to spaghetti code |
Date: |
Sat, 19 Jul 2008 02:25:14 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Jul 18, 11:24 pm, Tim Smith <reply_in_gr...@mouse-potato.com>
wrote:
> In article <4c15l5-fk5....@darkstargames.dnsalias.net>,
> Wolfgang Draxinger <wdraxin...@darkstargames.de> wrote:
>
>
>
>
>
> > Well, I know only the comments Linus Torvalds made about the
> > implications of using C++ to develop a kernel. And I totally
> > agree with him in his statements. Programming a kernel you want
> > to control every bit of the program (yes I know, that this
> > sentence can be interpreted in many ways, and each way totaly
> > matches what I mean).
>
> > A languages like C++, that hides (some) vital aspects of the
> > underlying mechanisms can break things at such a low level
> > application. I'm thinking mainly about the way, polymorphism is
> > implemented (there's no standard about that in current C++), how
> > name mangling is performed (dito), calling conventions if
> > objects are passed by reference (dito). Another problem is, that
> > the use of some C++ features (I'm looking at templates here)
> > will start a chain reaction in which code is created generically
> > w/o having any influence on the exact outcome. This is not the
> > same like using macros to create a similair effect; doing it
> > with a macro one must exactly know what's going on.
>
> I have yet to encounter a C++ compiler that will refuse to compile a
> program if it does not use polymorphism, passing objects by reference,
> and templates. There is nothing forcing someone who writes a kernel in
> C++ to do those (possibly) questionable things.
>
> --
you can call it C++ code but without them you are just codding in C
and the trouble is that many high level featuers do not always suit to
kernel programming ,on the other hand C++ is not high level enough for
some tasks such as web programming,multithreading ...
In short words today`s C++ cannot be considered as general purpose as
C used to be in good old days.
Q:Is there any alternative?(I mean a true ** modern general purpose
flexible** language with **suitable for mixed-level programming**)?
regards,
FM.
- Re: C++ equivalent to spaghetti code, (continued)
- Re: C++ equivalent to spaghetti code, fnegroni, 2008/07/17
- Re: C++ equivalent to spaghetti code, Wolfgang Draxinger, 2008/07/17
- Re: C++ equivalent to spaghetti code, Tim Smith, 2008/07/18
- Re: C++ equivalent to spaghetti code,
terminator <=
- Re: C++ equivalent to spaghetti code, Juha Nieminen, 2008/07/19
- Re: C++ equivalent to spaghetti code, James Kanze, 2008/07/20
- Re: C++ equivalent to spaghetti code, Alf P. Steinbach, 2008/07/20
- Re: C++ equivalent to spaghetti code, Alf P. Steinbach, 2008/07/20
- Re: C++ equivalent to spaghetti code, lawrence . jones, 2008/07/20
- Re: C++ equivalent to spaghetti code, James Kanze, 2008/07/20
- Re: C++ equivalent to spaghetti code, peter koch, 2008/07/20
- Re: C++ equivalent to spaghetti code, Flash Gordon, 2008/07/20
- Re: C++ equivalent to spaghetti code, Richard Heathfield, 2008/07/20
- Re: C++ equivalent to spaghetti code, David Kastrup, 2008/07/20