gnu-misc-discuss
[Top][All Lists]
Advanced

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

Re: C++ equivalent to spaghetti code


From: Roberto Waltman
Subject: Re: C++ equivalent to spaghetti code
Date: Tue, 15 Jul 2008 13:45:34 -0400

Campy Happer <campyhapper@yahoo.com> wrote:
... In the bad old days of programming,
>before subroutines were even available,
>people used to write "spaghetti code", which
>was an unreadable, unmaintainable mess of
>"goto" statements.
>...
>C++, with its multiple inheritance,
>templates, and vastly bloated class libraries
>such as STL and Boost, which permit and
>seem even to require illegible coding practices
>in which 5-deep derived classes are not
>unlikely, has led to the C++ equivalent
>of spaghetti code.
>
>But how to describe it?

In the one and only true way. The object-oriented version of
"Spaghetti code" is, of course, "Lasagna code".  (Too many layers.)

I have used that expression for years, but so far failed to obtain ISO
certification for it, or have it included in Webster's dictionary...

It goes without saying that any good chef can cook both Spaghetti and
Lasagna codes in either C or C++.  (If using the later I would
recommend inheriting  from the Pasta abstract base class.)
-- 
Roberto Waltman

[ Please reply to the group,
  return address is invalid ]


reply via email to

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