Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.maxwell.syr.edu!news.mathworks.com!uunet!in1.uu.net!uucp4.uu.net!world!bobduff
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: OO, C++, and something much better!
Message-ID: <E4voIF.86o@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
References: <JSA.97Jan16141937@alexandria> <32E67751.4AFC@parcplace.com> <5c6468$2rv$1@A-abe.resnet.ucsb.edu> <5c9b3u$a8$1@goanna.cs.rmit.EDU.AU>
Date: Fri, 31 Jan 1997 15:03:50 GMT
Lines: 26
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:244615 comp.lang.smalltalk:50603 comp.lang.eiffel:18053 comp.lang.ada:56946 comp.object:60649

In article <5c9b3u$a8$1@goanna.cs.rmit.EDU.AU>,
Richard A. O'Keefe <ok@goanna.cs.rmit.EDU.AU> wrote:
>I'm actually reading this in comp.lang.ada.  Ada provides keyword syntax
>for parameter passing.  If you write
>	Put(Item => Foo, File => Bar);
>it's easy to get the parameters right, because the name is reminding you
>what the argument should be.

I've often thought that it would be an improvement to Ada, if the
programmer of the function declaration decides whether named or
positional notation should be used, for each parameter.  Instead, Ada
allows a little bit too much flexibility, for my taste: The programmer
of each call gets to decide.  Also, you can write the parameters in any
order, if they're named, which you can't do in Smalltalk.

Note that sometimes positional notation is good even with 3 or 4
parameters.  There are some operations in Smalltalk which are something
like doSomethingTo: X and: Y and: Z and: W, where the "and:"s are just
noise.  And note that named notation is often good, even when there are
only 1 or 2 parameters.

IMHO, Ada programmers don't use named notation nearly enough.  (They
also sometimes write 10000000, when 10_000_000 is much more readable!)
Just laziness, I guess.

- Bob
