Re: A little disappointed
From: Anthony Borla (ajborla_at_bigpond.com)
Date: 11/28/04
- Next message: Gary Labowitz: "Re: A little disappointed"
- Previous message: Anthony Borla: "Re: A Question about arrays file merging"
- In reply to: Alwyn: "Re: A little disappointed"
- Next in thread: Gary Labowitz: "Re: A little disappointed"
- Reply: Gary Labowitz: "Re: A little disappointed"
- Reply: Alwyn: "Re: A little disappointed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 28 Nov 2004 22:27:39 GMT
"Alwyn" <alwyn@blueyonder.co.uk> wrote in message
news:pan.2004.11.28.12.49.33.431401@blueyonder.co.uk...
> On Sun, 28 Nov 2004 07:33:24 +1100, David White wrote:
> >
> > Pointers aren't too mysterious or difficult. If you practise
> > and experiment with them, you'll get more comfortable
> > with them.
>
> Pointers have been called 'the gotos of data' in that they
> introduce pitfalls for the unwary and are a source of
> programming errors.
>
True.
However, I'd suggest one way of improving matters is to make the unwary more
wary via eduaction / training rather than teaching avoidance [or as some
languages have done, disallow programmer access to the facility, thus
forcing avoidance].
Also, one important reason pointers have been problematic in C and C++ is
because pointer misuse often 'brings down the whole house' [i.e. program
crashes, core is dumped etc]. It's probably human nature to want to avoid
[rather than understand and try to circumvent] practices which lead to such
catastrophic events.
>
> I would suggest that newcomers to C++ should avoid them as
> far as possible;
>
I think the term 'newcomer' needs clarification. A newcomer may be someone:
* Entirely new to programming
* With some background in programming, probably with a
scripting language, but otherwise no formal data processing
knowledge / training
* A computer science / information technology student with
knowledge of algorthms and data structures, and some
experience of programming, say in Scheme or Java
* An experienced programmer undertaking a new project, who
has not been involved in the implementation language decision
process, and has to learn the language under pressure, and
by attending 5 Day ['all the C++ you can eat'] Courses
Each would need to approach the learning of C++ in very significantly
different ways in accordance with their current knowledge / skill level, and
specified learning goals.
>
> unfortunately, this advice can not be given to
> newcomers to C, where it is hardly possible to do anything
> useful without them.
>
Including obtain user input with 'scanf' which represents one of the most
[if not *the* most] common examples of 'pointer misuse' in C ;) ?
Cheers,
Anthony Borla
- Next message: Gary Labowitz: "Re: A little disappointed"
- Previous message: Anthony Borla: "Re: A Question about arrays file merging"
- In reply to: Alwyn: "Re: A little disappointed"
- Next in thread: Gary Labowitz: "Re: A little disappointed"
- Reply: Gary Labowitz: "Re: A little disappointed"
- Reply: Alwyn: "Re: A little disappointed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|