From: Richard B. Gilbert on
Stefaan A Eeckels wrote:
> On Thu, 05 Aug 2010 19:54:51 +1200
> Ian Collins <ian-news(a)hotmail.com> wrote:
>
>> On 08/ 5/10 06:13 PM, chuckers wrote:
>>> You probably can't really learn C++ without learning C at the same
>>> time but things like pointers etc. are a bit easier to deal with if
>>> you don't have to fight learning about objects and classes at the
>>> same time. Pointers are what will really screw up your programmes
>>> with really hard to track down bugs.
>> Which leads to one strong reason for using C++ - you can hide and
>> manage those pointers in such a way the programmer doesn't have to
>> worry about them!
>
> Arguably, having to deal with the nitty-gritty, and getting a good idea
> of what really goes on at CPU level helps putting things in
> perspective. I firmly believe all budding programmers should be
> required to write a substantial project in assembler, to ensure they've
> got their head screwed on right.
>
> This might stop the current Java-style OO silliness, with a top level
> program of 10 lines exploding into thousands of classes, each hiding a
> complex feature so that "the programmer doesn't have to worry about
> it". The result is usually atrocious, slow, unreliable and
> unmaintainable - exactly the opposite of the OO promise.
>

As an alternative, budding programmers should be required to "dekludge"
some Fortran code written by college students in the 1970's! The more
students who worked on it, the more valuable the exercise.

There's nothing like a subroutine that has one argument and ten named
COMMON blocks and uses either zero or one variable from each named
COMMON! I know it's hard to believe but I've seen it and I swear it's true!
From: Andreas Wacknitz on
Am 05.08.10 07:58, schrieb David Combs:
> Subj: these days, who & what-for use c vs c++?
>
> I've got this young guy (24 yrs old) visiting,
> who's been administering Solaris for a couple
> of years.
>
> One thing he has not had time to learn (didn't
> go to college) is a programming language, and
> was asking me for advice on where to start out.
>
> I felt that he should start out with C, because
> with it you were quickly (a) getting a feeling
> of what happens low-level, via pointers, call-stacks,
> functions calling other functions, the concepts of
> catch and throw, grabbing and releasing memory (malloc),
> string-scanning, array layout, and so on --
>
> all without a truly huge amount of syntax to master,
> plus classes and their syntax, new and destructors
> and who gets responsibility for what -- which would
> be the case with, say, C++.
>
>
> He replies that "no one uses C any more", and that if most
> jobs being advertised require C++ (not specifying "C" itself),
> then shouldn't he just start out learning C++ straight
> away, with no delay due to first learning and using
> and debugging a smaller, simpler language.
>
>
>
> What would be YOUR advice, and why?
>
> And what about his "no one uses C any more"?
>
>
> (The idea is that tomorrow I can show him this question
> I'm now posting, as well as the answers and opinions
> from you, well, experts.)
>
>
> THANK'S MUCH!
>
> David
>
>
Choose the right tool for the job to do.
Low level programming (eg drivers): C and assembler
Functional programming: Haskell, LISP, Scheme
Object orientation: LISP (with CLOS), Smalltalk or Self
Scripting: Perl, Python, Ruby
Embedded programming: (same as low level programming) + Erlang

I highly recommend to stay away from C++ for a beginner.
It tries to do all of the above (without scripting) and fails miserably
everywhere. It is overly complex and many "C++ programmers" use it only
as a better C compiler. To get some ideas read and enjoy the following
site: http://yosefk.com/c++fqa/defective.html
If that doesn't make you fear of C++ then go and get the sources of the
Boost library and try to read and understand it (OK, that's a little bit
unfair).


Andreas
From: Rick Jones on
David Combs <dkcombs(a)panix.com> wrote:
> One thing he has not had time to learn (didn't go to college) is a
> programming language, and was asking me for advice on where to start
> out.

If he didn't go to college, I would go back one step further and start
with a good text on data structures and algorithms. And *then*
consider a programming language.

And for the first language - I'll go back to what I was
introduced/subjected to back in '84 - Karel the Robot :) Pickbeeper,
putbeeper, shovebeeper... :)

rick jones
--
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
From: Stefaan A Eeckels on
On Thu, 05 Aug 2010 19:43:16 +0200
Andreas Wacknitz <A.Wacknitz(a)gmx.de> wrote:

> If that doesn't make you fear of C++ then go and get the sources of
> the Boost library and try to read and understand it (OK, that's a
> little bit unfair).

Another lovely :) bit of C++ code is SGI's original STL. Not that the
other implementations are anything to write home about...

OK, this is as old as Methuselah, but it always makes me chuckle:

TASK: Shoot yourself in the foot.

C: You shoot yourself in the foot.

C++: You accidentally create a dozen instances of yourself and shoot
them all in the foot. Providing emergency medical assistance is
impossible since you can't tell which are bitwise copies and which are
just pointing at others and saying, "That's me, over there."

Java: After importing java.awt.right.foot.* and
java.awt.gun.right.hand.*, and writing getter and setter methods for
those classes, you've forgotten what the hell you're doing.

Smalltalk - you shoot yourself in the foot, "Walkback: Foot does not
understand: bullet"

--
Stefaan A Eeckels
--
"Treason doth never prosper. What is the reason?
For if treason prosper, none dare call it treason."
From: nelson on
i learnt c++, then java with a certain tertiary education place...then
started with C in the real world and thought ah hah! that's why.

with the exception of the sometimes trip in java via VWP & netbeans i
really only use various shell or perl scripts and C these days.

there was a somewhat interesting debate on java ranch about go
recently though