|
| Group: |
comp.programming |
[ Post new message ] |
|
|
 |
| Author: |
William Pursell |
| Subject: |
Re: Whats the best language to learn... |
| Body: |
On 20 Aug, 21:55, Juha Nieminen <nos...@thanks.invalid> wrote:
> William Pursell wrote:
> > I have no problem at all acknowledging that working with
> > dynamic data is more complicated in C than it is in C++. =A0What
> > have I written that makes you think I have an issue with that?
>
> =A0 You wrote that if we had to choose which one to recommend for a
> beginner, C or C++, you would recommend C because C++ is "way too
> complicated". This is what I objected against. You were implying that C
> would be much easier for a beginner to use because it's "simpler".
I didn't merely imply that C would be easier to learn because it is
simpler, I stated it quite clearly.
> =A0 In my opinion, if I had to choose between recommending C or C++, I
> would definitely recommend C++ because many basic tasks (such as for
> example reading input) are simpler in C++ than in C.
>
That really depends on the input. "fread( buffer, size, count,
stdin )"
is pretty simple. In problem domains where you need to parse
your input as text, then C++ with the STL has the advantage
over C with no external library support. But if you just need
8192 bytes, I don't see that C++ is any easier to use for reading
the input.
> > C is a simpler language than C++.
>
> =A0 C may be simpler as in "has fewer features", not simpler as in "it's
> easier to use". From the point of view of a beginner (which is what this
> whole thread is all about) the latter is what matters. Thus I maintain
> my original position: I would never recommend C as the first language
> for a beginner.
I think that understandability is more important than ease of use
in a first language, and C is more understandable than C++
because it is simpler. And that is why I would recommend C
before C++ as a first language, although both are way down on
my list of recommendations. Well, I suppose if I actually made
a list they would both be in the top 20, so maybe "way down"
is extreme. They're certainly both ahead of whitespace:
http://compsoc.dur.ac.uk/whitespace/ ;)
|
 |
|
|
|