Beginning C++ in FreeBSD
DoubleF
doublef at tele-kom.ru
Sat Apr 17 05:41:01 PDT 2004
On Sat, Apr 17, 2004 at 10:50:29AM +0000,
Daniela probably wrote:
> On Friday 16 April 2004 21:52, Lucas Holt wrote:
> > > Why would one need C++ if it's converted to C anyway?
> >
> > C++ is useful for programmers that believe in object oriented
> > methodologies. Some things are easier to do in C++ as well. It all
> > depends on the programmer.
> >
> > You seem to favor assembly languages. I've found that many people into
> > assembly never seem to get OO and therefore languages like C++ and Java
> > make no sense to them. Assembly *can be* fast but its not portable.
> > C was created to make unix portable. C++ was created to add OO
> > features to C. (as was objective c)
>
> I do program in C++ quite often and it does make sense to me. I know seven
> programming languages and which one I use depends on the program, as I find
> them all easy. OO languages can be optimized differently than non-OO
> languages, and when you translate one language into another, this advantage
> gets lost.
>
> I would rather say, assembly is fast and can be portable, if it's done
> properly. Yes, it is an unforgiving language, but I think beginning
> programmers need exactly that.
>
I don't think that assembly is the best language to learn first. English
is:) (I mean, reading the draft standards is a good idea; though they
can't be regarded as manuals, they have valuable examples and notes).
Learning assembly has the added advantage of knowing (at least
basically) what happens when you do a dynamic_cast<>(), for instance.
Assembly doesn't have to be portable to be usable this educational way.
At least for me, this is necessary to be sure of what I'm doing in C++.
This doesn't mean that to understand a C++ program, I have to convert it
to assembly:). It just means that, when I face a problem, I can dig into
the details and find out what I've done wrong, etc. OO means a high
level of abstraction, and if part of the levels are floating in the air
with nothing to support them, you sooner or later will face problems ---
the problems of your misunderstanding how it works.
I don't mean you have to write every program in assembly, but if you
understand how it works --- it certainly helps. YMMV.
--
DoubleF
Legalize free-enterprise murder: why should governments have all the
fun?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040417/12d9812d/attachment.bin
More information about the freebsd-questions
mailing list