Newsgroups: comp.edu,comp.lang.scheme,comp.lang.c++
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!ix.netcom.com!netcom.com!NewsWatcher!user
From: hbaker@netcom.com (Henry Baker)
Subject: Re: Translations from Scheme to C++ as aid to teaching C++ after Scheme
Message-ID: <hbaker-1801951815190001@192.0.2.1>
Sender: hbaker@netcom.com (Henry G. Baker)
Organization: nil
References: <leavens.790442404@bambam.cs.iastate.edu> <cppD2M6ov.I7B@netcom.com> <leavens.790468938@bambam.cs.iastate.edu>
Date: Thu, 19 Jan 1995 02:13:13 GMT
Lines: 27
Xref: glinda.oz.cs.cmu.edu comp.edu:11381 comp.lang.scheme:11776 comp.lang.c++:108142

In article <leavens.790468938@bambam.cs.iastate.edu>,
leavens@cs.iastate.edu (Gary Leavens) wrote:

> cpp@netcom.com (Robin Rowe) writes:
> 
> ><<  The main semantic difficulty in translating Scheme to C++ is that
> >while C++ is technically an expression language, its expressions are     
> >weak compared to Scheme's. >>
> 
> >Hi. Would you define what you mean by "weak."
> 
> I probably can't without starting a religious language war (:-).
> But essentially, because of the distinction made between expressions
> and statements in C and C++, you can't have a subexpression that
> includes a declaration, which would allow a direct translation of
> things like LET in Scheme.  So by "weak" I mean not as expressive
> or orthogonal.

C++ has the same failing as C in not inheriting the BCPL 'valof' construct.
This failing doesn't even begin to get at the real weaknesses of C++, but it
is a start.

For some other major problems, see:

"Iterators: signs of weakness in object-oriented languages".  ACM OOPS
Messenger 4, 3 (July 1993), 18-25.  Also, URL =
ftp://ftp.netcom.com/pub/hb/hbaker/Iterator.html  (also .ps.Z)
