From: ········@bayou.uh.edu
Subject: Re: C++ briar patch (Was: Object IDs are bad)
Date: 
Message-ID: <5lkplj$2e3$1@Masala.CC.UH.EDU>
Alaric B. Williams (······@abwillms.demon.co.uk) wrote:

[Snip]

: I think that a common problem in the C/C++ camp is misinformation.
: People don't really understand very high level languages (VHLLs), and
: get the impression we're the ones in the wrong; diehard language
: bigots, like those people who go around looking at PCs and saying
: ">sigh< my Amiga did all that /much/ better, 5 years ago, and for half
: the cost", and acting as though Amigas were the best computers in the
: world.

I know exactly what you are saying.  Keep in mind that there was a
time when I thought that C++ was actually good -- this was before
I spent time looking at various other languages and actually
_UNDERSTANDING_ them, so I understand where many of the C++
programmers are coming from.  I still remember my first exposure
to Lisp, it was in a rinky dink AI class, where we were taught
the syntax, none of the advantages, no paradigm and basically
left to try to write some C++ in what limited subset of Lisp
we had learned.  I had a very low opinion of Lisp for that
very reason.  Not knowing how powerful the language really
was, I end up feeling that Lisp was inferior for the very
reasons it was superior to C++ (ie: no pointers, non-traditional
syntax, interactive, etc...)

It was only afterwards when I came back to Lisp through a rather
large detour (Ada to scripting languages to a chance encounter
with functional programming back to Lisp and then Scheme -- a
2 year route) that I had the necessary understanding to realize
what a remarkably powerful and elegant vehicle Lisp was for
programming!  As long as I did not know enough about Lisp and
kept on trying to write C in Lisp, I was forever doomed to
misunderstand and belittle this marvelous language.

I feel the other C++ programmers are the same way.  They are
locked into a primitive paradigm where pointers are an
inseperable companion, and this clouds their view.  They
don't realize that there are other, better ways of doing
things and so they unjustly attack other languages which
they regard as either inferior, or a threat.


[Snip]

: To get back to the point, C/C++ people often seem to think that VHLL
: people are harking after something we think to be really cool for the
: wrong reasons. They think "Jeeze, you can't even cast between pointers
: and ints. How can I write my fast array search in that thing?".

Exactly.  They do this without realizing that casting between
pointers and ints (*smirk*) is idiotic, and that the only reason
they are forced to do it is because the language they are using
is flawed.  They can't step back and realize that what they are
doing is horrid programming practice, and that VHLLs are right
for preventing them from doing this (and giving them the tools
for avoiding this).  I mean really what are pointers?  They are
a low level construct for getting around limits in a language
like lack of automatic memory management and recursive data
types.  So a language like Lisp with automatic memory management
and recursive data types has no need for pointers.  But do they
understand this?  No, they are used to creating things like lists
by walking down pointers until they hit NULL, and can't comprehend
something as simple as being able to have these things built in.


: They are misinformed.

Indeed they are.


: This effect manifests itself when people like Dean say things like
: "Huh, I'm not surprised C++ won over all your crap languages. Wake up
: to the real world", followed by a whole load of /incorrect/
: statements, many of which are totally hilarious to VHLL gurus.

Exactly.


: I was particularily amused at the suggestion that C++ is good because
: everything is out in libraries, rather than in the language core!

Oh definitely.  I honestly thought Dean had flipped his lid when
he actually suggested that C++ was better than Lisp because it
didn't provide anything which meant that I had to _BUY_ third
party libraries with what should have been basic functionality,
rather than have this functionality available to me!

I mean to show you how lost this guy is, he could not for the
life of him understand that a language could provide you with
numerous features and yet allow you tremendous flexibility!
This is what C++ does to people :(.  I would have recommended
that he read a book on Common Lisp (or pointed him to some web
site), but I knew that his mind was too closed and that I'd
be wasting my time.


: I'd like to make a webpage oriented at C/C++ programmers, explaining
: all the common misconceptions about functional languages in terms
: they'll be able to relate to. That might help.

It might.  The problem again is that many C++ programmers have already
made up their minds and refuse to listen to logic.  But try it, I
mean as a former C++ programmer I saw the light, so certainly
others can do it.


: In the meantime, I'd suggest that anyone out there who thinks C++ is a
: powerful language lurk on comp.lang.functional for a while. It's not a
: very high volume group unless a comp.lang.c++ crosspost war starts up!

Definitely, and ask questions.  If there's a concept you don't
understand or something that you see as seeming counterproductive,
ask about it.  Take the time to understand the paradigm and the
concepts involved.  You will see exactly why many people are not
looking back.

[Snip]

: ABW
: --

: Limited Warranty: Macrosoft Corporation cannot accept
: any responsobility for geological, ecological, biological, sociological,
: political, or nuclear disasters caused by Windows for Early Warning
: and Defence. The software is supplied as is, with no express or
: implied warranty, and with no guarantee of fitness of purpose,
: or sufficient reliability to be placed in a situation to threaten
: millions, if not billions, of innocent lives.

: FUN: http://www.abwillms.demon.co.uk/alaric/wfewad.htm
: INTERESTING: http://www.abwillms.demon.co.uk/os/
: OTHER: http://www.abwillms.demon.co.uk/

--
Cya,
Ahmed
From: Alaric B. Williams
Subject: Re: C++ briar patch (Was: Object IDs are bad)
Date: 
Message-ID: <337e5ea1.8272825@news.demon.co.uk>
On 17 May 1997 17:25:07 GMT, ········@Bayou.UH.EDU
(········@bayou.uh.edu) wrote:

>Alaric B. Williams (······@abwillms.demon.co.uk) wrote:
>
>[Snip]

>I know exactly what you are saying.  Keep in mind that there was a
>time when I thought that C++ was actually good -- this was before
>I spent time looking at various other languages and actually
>_UNDERSTANDING_ them, so I understand where many of the C++
>programmers are coming from. 

Hey, me too! Most of my early language designs went in the direction 
of Eiffel or Ada!

> I still remember my first exposure
>to Lisp, it was in a rinky dink AI class, where we were taught
>the syntax, none of the advantages, no paradigm and basically
>left to try to write some C++ in what limited subset of Lisp
>we had learned. 

Same here. I read a book from the local library, and I really just saw
it as a different syntax. I didn't even notice that it was collecting
garbage; it just seemed to pass these values around, and at the age of
12, I wasn't intelligent enough to think about storage in that way; I 
was more used to languages without heaps.

At about that time, I thougt Pascal's "new" (C++ like heap allocator)
was dead cool :-)

> I had a very low opinion of Lisp for that
>very reason.  Not knowing how powerful the language really
>was, I end up feeling that Lisp was inferior for the very
>reasons it was superior to C++ (ie: no pointers, non-traditional
>syntax, interactive, etc...)

Exactly!

>It was only afterwards when I came back to Lisp through a rather
>large detour (Ada to scripting languages to a chance encounter
>with functional programming back to Lisp and then Scheme -- a
>2 year route) that I had the necessary understanding to realize
>what a remarkably powerful and elegant vehicle Lisp was for
>programming!  As long as I did not know enough about Lisp and
>kept on trying to write C in Lisp, I was forever doomed to
>misunderstand and belittle this marvelous language.

Ah, well my language design efforts had led me to understand
the logical paradigm, but functional programming made no sense
to me. I read the "what is FP?" bit of the c.l.f faq, and was
totally bemused (no offence, FAQ maintainer :-).

So I asked my dad for a copy of SICP for xmas, and only when I got
to chapter three did I realise I'd been programming functionally all
through chapters 1 and 2!

> So a language like Lisp with automatic memory management
>and recursive data types has no need for pointers.  But do they
>understand this?  No, they are used to creating things like lists
>by walking down pointers until they hit NULL, and can't comprehend
>something as simple as being able to have these things built in.

I wouldn't use the phrase "can't comprehend" IMHO - more like "don't
think in terms of" :-)

>: I was particularily amused at the suggestion that C++ is good because
>: everything is out in libraries, rather than in the language core!

>Oh definitely.  I honestly thought Dean had flipped his lid when
>he actually suggested that C++ was better than Lisp because it
>didn't provide anything which meant that I had to _BUY_ third
>party libraries with what should have been basic functionality,
>rather than have this functionality available to me!

Some Misconceptions I Have Heard:

 - High Level means lots of features (like Common Lisp)
   (Really, in this context, it's more like a small but well chosen
    set of orthogonal features)

 - VHLLs are slow
   (Many implementations of them are slow since they're designed for
    studying language theory. However, the languages themselves have
    far greater potential for speed than C++ [in general] for a whole
    host of reasons)

 - VHLLs have wierd syntax you need to meditate for weeks to get the
   hand of
   (Maybe this is true! <G>
    However, any language syntax is wierd to outsiders, and bliss to
    insiders. The notorious Lisp parenthesis syntax is pretty cool
    once you can handle it, since the fact that it uses the same
    "slightly awkward" (depending upon opinions; I present the
    arithmetic mean) rule *everywhere*, it's actually wonderfully
    consistent etc. once you've learnt it. It's very much an
    "expert's" syntax.)

>I mean to show you how lost this guy is, he could not for the
>life of him understand that a language could provide you with
>numerous features and yet allow you tremendous flexibility!

Have pity!

>This is what C++ does to people :(.  I would have recommended
>that he read a book on Common Lisp (or pointed him to some web
>site), but I knew that his mind was too closed and that I'd
>be wasting my time.

I would recommend reading c.l.f, to Get A Taste. I forwarded
a few LispOS postings to some friends who couldn't understand
my taste in languages, and they were somewhat disturbed. I've
opened a few conceptual doors there, I think.

>: I'd like to make a webpage oriented at C/C++ programmers, explaining
>: all the common misconceptions about functional languages in terms
>: they'll be able to relate to. That might help.

>It might.  The problem again is that many C++ programmers have already
>made up their minds and refuse to listen to logic.  But try it, I
>mean as a former C++ programmer I saw the light, so certainly
>others can do it.

It just takes a little step, to give it the benefit of the doubt -

"I'll just try this, it sounds interesting"

>: In the meantime, I'd suggest that anyone out there who thinks C++ is a
>: powerful language lurk on comp.lang.functional for a while. It's not a
>: very high volume group unless a comp.lang.c++ crosspost war starts up!

>Definitely, and ask questions.  If there's a concept you don't
>understand or something that you see as seeming counterproductive,
>ask about it. 

We love a good paradigm explanation contest :-)

>: Limited Warranty: Macrosoft Corporation cannot accept
>: any responsobility for geological, ecological, biological, sociological,
>: political, or nuclear disasters caused by Windows for Early Warning
>: and Defence. The software is supplied as is, with no express or
>: implied warranty, and with no guarantee of fitness of purpose,
>: or sufficient reliability to be placed in a situation to threaten
>: millions, if not billions, of innocent lives.
>
>: FUN: http://www.abwillms.demon.co.uk/alaric/wfewad.htm
>: INTERESTING: http://www.abwillms.demon.co.uk/os/
>: OTHER: http://www.abwillms.demon.co.uk/

Dammit, that thing didn't look to long when I put it in. Hmmm.

>--
>Cya,
>Ahmed

ABW
--

DOS Box: Windows for Early Warning and Defence supports
a fully functional DOS emulation, allowing one to
consider tactical matters with legacy applications,
such as "Sid Meyer's Civilisation ][" or "Lemmings".

FUN: http://www.abwillms.demon.co.uk/alaric/wfewad.htm
INTERESTING: http://www.abwillms.demon.co.uk/os/
OTHER: http://www.abwillms.demon.co.uk/