🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #2049

Re: Should I learn C or C++ first?

#2049
From: Marauder
Date: Thu, 07 Sep 1995 01:25
48 lines
2916 bytes
danker@hardy.ocs.mq.edu.au (Duncan Anker) wrote:
> Marauder (marauder@encomix.es) wrote:

>: And replying to the subject, imho you shouldn't learn C++ before C.
>: I choose between C, C++ and Asm for my projects. See?  C and C++. Some
>: things are better to write in C and others in C++.

> To chuck in my <checks current inflation values and exchange rates> $5 worth,

  15$ by now..

> our university used to teach Modula-2 in the first semester and C in the
> second semester. Now they teach C++ in first semester, as of this year, and
> I have seen numerous students who understood C++ getting totally thrown.

   A friend has just finished uni. So I asked him some questions about
   protected mode and some asm stuff. He told me that by now he hated
   asm and the learnt by mind something about descriptor tables, but
   didn't remember. Oh, and he thought that DOS4GW was a copy protection.
   I got quite depressed ..

> For example, I was asked why some code didn't work. It was because the
> variable was being declared in the middle of the function body, not at the
> top. When I pointed this out, I was reminded that it's legal to do this in C++.

   But isn't it better to have all the vars at the top, commented, indented,
   and initialized so you always know where to find them?

> I think it's far easier to learn C, and pick up the C++ extras later than it
> is to try and do it the other way around. Teach people 'cout' and they'll
> want to know why they have to use printf 6 months later...

   Yes, but the problem with C-->C++ is that people have problems in the
   transition (me, him, her, ..) and start to write strange code without
   a class and only couts and call it C++. Then you feel you don't like
   or need it. And after some more C, you finally realize that "Hey, I
   could do this via classes" and start to use C++ properly. Oh, I still
   use cprintf instead of cout (I really hate it)

> C is also good for really small projects when you don't want code bloat ;-)

   Or to use assembler, inlined or called, doesn't matter.


C++ya
 ______________________________________________________________________________
| marauder@encomix.es | Eastwood: Come on, make my day | Spanish/Danish Power! |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID: <8biTwcM6hDXK083yn@encomix.es>
Path: arc1-ca.pugleaf.net!news.encomix.es!not-for-mail
References: <40o2ee$aqp@deyke3.fc.hp.com> <DDIE24.Hqw@info.uucp> <QY4QwcM6hzrf083yn@encomix.es> <42jlin$rfl@sunb.ocs.mq.edu.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.encomix.es!not-for-mail
From: marauder@encomix.es (Marauder)
Newsgroups: rec.games.programmer,comp.lang.c++
Subject: Re: Should I learn C or C++ first?
Date: 7 Sep 1995 03:25:36 +0200
Organization: InterComputer Soft S.A. [Spain]
Message-ID: <8biTwcM6hDXK083yn@encomix.es>
References: <40o2ee$aqp@deyke3.fc.hp.com> <DDIE24.Hqw@info.uucp>
 <QY4QwcM6hzrf083yn@encomix.es> <42jlin$rfl@sunb.ocs.mq.edu.au>
NNTP-Posting-Host: encomix.es
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit