Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #7270

Re: Why C is vastly superior to C++

From jacob navia <jacob@spamsink.net>
Newsgroups comp.lang.c++
Subject Re: Why C is vastly superior to C++
Date 2011-06-30 08:42 +0200
Organization lccwin
Message-ID <iuh5t3$3cu$1@speranza.aioe.org> (permalink)
References <iucgg0$ej1$1@speranza.aioe.org> <4e0b8929$0$2851$7b1e8fa0@news.nbl.fi> <iug404$to$1@speranza.aioe.org> <4e0c04b7$0$2859$7b1e8fa0@news.nbl.fi> <slrnj0o4ql.gtj.grahn+nntp@frailea.sa.invalid>

Show all headers | View raw


Le 30/06/11 08:10, Jorgen Grahn a écrit :
> On Thu, 2011-06-30, Juha Nieminen wrote:
>> jacob navia<jacob@spamsink.net>  wrote:
>>> The problem with my brain is that its memory is not extensible. Trying
>>> to understand and memorize the specifications for overloaded function
>>> calls in the C++ specs goes for PAGES AND PAGES, impossible for a brain
>>> to swallow and digest that without a severe indigestion.
>>
>>    C isn't all that much better in this regard. C parsers may be significantly
>> simpler to create than full-fledged C++ parsers, but that doesn't necessarily
>> mean that *programming* in C is any simpler or easier than in C++.
>>
>>    When developing large projects in C you usually need to use paradigms and
>> coding conventions that exist solely because of what C lacks (iow. they are
>> unnecessary in C++ and most other languages). In other words, you are
>> mostly just changing your brain capacity usage from learning language
>> features to learning coding conventions and strict guidelines that should
>> be unnecessary. In a way, you could say that most large projects use a
>> "megalanguage" on top of C, and any person who wants to participate in the
>> development of that project needs to learn it.
>
> Precisely. Compared to C, C++ moves complexity /from/ N program to 1
> language, so I don't have to learn N different partial solutions to
> the same problem.
>


Yes, you have a point here (You and Mr Nieminen). That is a weak point
in C. I am trying to address this within the C community, with
relatively lack of success.

In this sense, the problems with those features is not that they exist,
but that their usage is extremely complicated and hard to follow.

Templates are an example of that. They are both great when they work,
incomprehensible when they don't. You have then, to memorize a series
of "gotchas" and template conventions that make the subject
extremely obscure and memory consuming.

Metaprogramming should be done at compile time within a specific
meta-language, designed to do that. This has been done with extremely
hard to follow templates like IF and others, that approach the
metalanguage goal without EXPLICITELY having a meta-language.

All the memory required to memorize the hacks needed now would be
unnecessary if we would have a simple functional language where
we describe templates with parameter checking, etc etc. A meta-language 
would (again)  "move complexity /from/ N programs to 1 language"

jacob

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why C is vastly superior to C++ jacob navia <jacob@spamsink.net> - 2011-06-28 14:12 +0200
  Re: Why C is vastly superior to C++ jacob navia <jacob@spamsink.net> - 2011-06-28 14:15 +0200
  Re: Why C is vastly superior to C++ Noah Roberts <dont@email.me> - 2011-06-28 10:02 -0700
    Re: Why C is vastly superior to C++ jacob navia <jacob@spamsink.net> - 2011-06-28 19:14 +0200
  Re: Why C is vastly superior to C++ Juha Nieminen <nospam@thanks.invalid> - 2011-06-29 20:20 +0000
    Re: Why C is vastly superior to C++ jacob navia <jacob@spamsink.net> - 2011-06-29 23:04 +0200
      Re: Why C is vastly superior to C++ Ian Collins <ian-news@hotmail.com> - 2011-06-30 09:45 +1200
      Re: Why C is vastly superior to C++ Juha Nieminen <nospam@thanks.invalid> - 2011-06-30 05:08 +0000
        Re: Why C is vastly superior to C++ Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-06-30 06:10 +0000
          Re: Why C is vastly superior to C++ jacob navia <jacob@spamsink.net> - 2011-06-30 08:42 +0200
            Re: Why C is vastly superior to C++ Ian Collins <ian-news@hotmail.com> - 2011-06-30 21:08 +1200
              Templates (was Re: Why C is vastly superior to C++) Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-06-30 15:03 +0000
                Re: Templates (was Re: Why C is vastly superior to C++) Juha Nieminen <nospam@thanks.invalid> - 2011-06-30 16:40 +0000
                Re: Templates (was Re: Why C is vastly superior to C++) "MikeP" <mp011011@some.org> - 2011-06-30 22:06 -0500
                Re: Templates (was Re: Why C is vastly superior to C++) "MikeP" <mp011011@some.org> - 2011-06-30 22:05 -0500
            Re: Why C is vastly superior to C++ Juha Nieminen <nospam@thanks.invalid> - 2011-06-30 10:45 +0000
              Re: Why C is vastly superior to C++ BGB <cr88192@hotmail.com> - 2011-06-30 16:09 -0700
            Re: Why C is vastly superior to C++ Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-07-07 00:39 -0700
      Re: Why C is vastly superior to C++ Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-06-30 06:32 +0000
      Re: Why C is vastly superior to C++ Noah Roberts <dont@email.me> - 2011-06-30 10:49 -0700
      Re: Why C is vastly superior to C++ "io_x" <a@b.c.invalid> - 2011-07-01 10:20 +0200
        Re: Why C is vastly superior to C++ "io_x" <a@b.c.invalid> - 2011-07-02 08:14 +0200
  Re: Why C is vastly superior to C++ Goran <goran.pusic@gmail.com> - 2011-06-30 23:56 -0700
  Re: Why C is vastly superior to C++ Juha Nieminen <nospam@thanks.invalid> - 2011-07-07 16:39 +0000
    Re: Why C is vastly superior to C++ jacob navia <jacob@spamsink.net> - 2011-07-07 18:55 +0200
      Re: Why C is vastly superior to C++ "MikeP" <mp011011@some.org> - 2011-07-07 16:48 -0500
        Re: Why C is vastly superior to C++ jacob navia <jacob@spamsink.net> - 2011-07-08 01:29 +0200
          Re: Why C is vastly superior to C++ "MikeP" <mp011011@some.org> - 2011-07-07 19:13 -0500
      Re: Why C is vastly superior to C++ Juha Nieminen <nospam@thanks.invalid> - 2011-07-08 06:57 +0000

csiph-web