🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2616

Re^2: Complexity of syntax

#2616
From: John Lacey
Date: Mon, 07 Jan 1991 18:56
40 lines
2217 bytes
brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes:

>In article <1991Jan4.152846.15917@maths.nott.ac.uk> anw@maths.nott.ac.uk (Dr A. N. Walker) writes:
>> 	Well, it *is* a problem.  You have to invent a name.

>Every coding stylebook I've seen recommends that you give names to
>everything. It's a very good idea, you know.

No, I don't know, and I doubt you do, either.  If functions are truly
to be first class objects, they should have the right to be anonymous.
In this sense, neither functions nor structs are first class objects
in C.

Do you really gives names to everything?  Every integer constant,
every string, every character?  Or do you let them go nameless?

Personally, I would prefer Scheme, but the only language everyone on
my project is familiar with is C.  The result is that my code is
sprinkled with dumb 1 line functions, with dumb names, that I need to
declare to pass them to other functions.  They mostly rearrange their
arguments.

>Which is why you choose more meaningful names. Like fxpc, a function
>that adds c to x.

"There are already enough names." Lao Tze

>> but why *not* allow
>> 	z = 2 * sin (theta) * integral ((float x)(blah), 0, pi) + ...;

>Who cares? How about because it's a pain to parse, compile, and read?

So because it makes writing compilers a bit more difficult, we should
abandon it?  Do you do _all_ your coding in machine code?  Like any
other construct, there are good ways to format it, and poor ways.
Using the Scheme method, which requires a lambda construct, makes the
anonymous function clearly visible.
-- 
John Lacey         614 436 3773         73730,2250
john@basho.uucp  or  basho!john@cis.ohio-state.edu
Technical Details
Message-ID: <1991Jan7.185658.20240@basho.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!n8emr!uncle!basho!john
References: <1990Dec29.101233.1894@mathrt0.math.chalmers.se> <18747:Jan220:02:1091@kramden.acf.nyu.edu> <1991Jan4.152846.15917@maths.nott.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!n8emr!uncle!basho!john
From: john@basho.uucp (John Lacey)
Newsgroups: comp.lang.misc
Subject: Re^2: Complexity of syntax
Message-ID: <1991Jan7.185658.20240@basho.uucp>
Date: 7 Jan 91 18:56:58 GMT
References: <1990Dec29.101233.1894@mathrt0.math.chalmers.se> <18747:Jan220:02:1091@kramden.acf.nyu.edu> <1991Jan4.152846.15917@maths.nott.ac.uk>
Organization: Sportsware
Lines: 40