* Re: Final kick at the "Merced Guessing Game"
@ 1997-10-03 4:00 Robert Harley
1997-10-06 4:00 ` Richard A. O'Keefe
0 siblings, 1 reply; 43+ messages in thread
From: Robert Harley @ 1997-10-03 4:00 UTC (permalink / raw)
Richard A. O'Keefe (ok@goanna.cs.rmit.edu.au) wrote:
>Doesn't work.
>
>There's an illuminating discussion in the rationale of the POSIX.1
>standard [...]
>
>THIS is Nick Maclaren's point. Given
> char **triMat;
>the declaration
> double const * const * const constTriMat = triMat;
>is simply illegal.
Sure, and it's "simply illegal" to assume that integer arithmetic is
done in binary.
>It's illegal because there are plausible implementations where it won't work.
>[...ad hominem deleted...]
But guess what, there are other implementations that are not only
plausible but actually exist! And they have implementation-dependent
features left open by the standard, and extensions not specified by
the standard! Gasp!
Over here in the real world, we compile our programs with them:
compilers for which integers are in binary and type qualifiers
give warnings sometimes, not errors. If you are allergic to such a
warning, stick in a cast as Nick suggested.
>>Whereas your beloved Fortran checks that the user's assumptions about
>>lack of aliasing are correct, perhaps?
>
>Yes, there are indeed static checkers available for Fortran that will
>check such assumptions. I have not used any myself, but I am aware of
>two.
Ah, so in the case of C refer to the standard only, in order to
criticize limitations in it. But for other languages, dredge up extra
features you "are aware of" in implementations you've never used.
Everybody is fooled by this devastating ploy, so we'll now delete our
programs, apps and O.S.es, the transport protocols that will send this
message and so on, and rewrite them in a superior language.
-- Rob.
.-. Robert.Harley@inria.fr .-.
/ \ .-. .-. / \
/ \ / \ .-. _ .-. / \ / \
/ \ / \ / \ / \ / \ / \ / \
/ \ / \ / `-' `-' \ / \ / \
\ / `-' `-' \ /
`-' Linux + 500MHz Alpha + 256MB SDRAM = heaven `-'
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-03 4:00 Final kick at the "Merced Guessing Game" Robert Harley
@ 1997-10-06 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` boo
0 siblings, 1 reply; 43+ messages in thread
From: Richard A. O'Keefe @ 1997-10-06 4:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4254 bytes --]
harley@pauillac.inria.fr (Robert Harley) writes:
>Richard A. O'Keefe (ok@goanna.cs.rmit.edu.au) wrote:
>>Doesn't work.
>>
>>There's an illuminating discussion in the rationale of the POSIX.1
>>standard [...]
>>
>>THIS is Nick Maclaren's point. Given
>> char **triMat;
>>the declaration
>> double const * const * const constTriMat = triMat;
>>is simply illegal.
>Sure, and it's "simply illegal" to assume that integer arithmetic is
>done in binary.
This is completely wrong, and betrays a total lack of familiarity
with the history or content of the C standard.
The C standard *requires* binary integer arithmetic.
C89 was carefully worded to allow any of
sign-and-magnitude (like Unisys A series machines)
ones complement (like Unisys 2200 machines)
twos complement
But the C standard is quite clear that all integer arithmetic results
must be as if one of these systems were in use.
In contrast, the mismatched pointer example is one where the
compiler is not merely not required to make it work, the
compiler is *REQUIRED* to issue a diagnostic.
>But guess what, there are other implementations that are not only
>plausible but actually exist!
So? The C standardisers were not interested in limiting C to only
the machines where your prejudices happen to be valid. The C9X
revisers have no interest in such limitations either.
>And they have implementation-dependent
>features left open by the standard, and extensions not specified by
>the standard! Gasp!
Yeah, but mixing up pointers to differently qualified objects is NOT
only of those things left open.
>Over here in the real world, we compile our programs with them:
>compilers for which integers are in binary
which the C standard clearly and explicitly requires
>and type qualifiers
>give warnings sometimes, not errors.
Then you are not using standard C compilers. That is your privilege.
>If you are allergic to such a
>warning, stick in a cast as Nick suggested.
No. The diagnostics are required because a cast _wouldn't_ fix the
problem.
>>>Whereas your beloved Fortran checks that the user's assumptions about
>>>lack of aliasing are correct, perhaps?
>>
>>Yes, there are indeed static checkers available for Fortran that will
>>check such assumptions. I have not used any myself, but I am aware of
>>two.
>Ah, so in the case of C refer to the standard only, in order to
>criticize limitations in it.
Are you serious?
I have not criticised any limitation in the C standard at all.
I have pointed out that the kind of Stupid Pointer Tricks (comp.std.c
idiom) you want to play are explicitly forbidden by the standard.
I THINK THIS IS RIGHT. I am not criticising the standard there,
I am approving it.
>But for other languages, dredge up extra
>features you "are aware of" in implementations you've never used.
Those checkers enforce aspects of the Fortran standard.
C compilers are required to enforce aspects of the C standard.
As for me, I use the best static checkers for C that I can get
my hands on, and if I did as much Fortran coding as I do C,
I would make sure to use the best static checkers for Fortran
that I could get my hands on.
>Everybody is fooled by this devastating ploy, so we'll now delete our
>programs, apps and O.S.es, the transport protocols that will send this
>message and so on, and rewrite them in a superior language.
Oh grow up.
Where did I say C was inferior?
On *one specific point*, I provided factual support for Nick Maclaren's
claim. That has absolutely no bearing on whether one language is
better than the other *in general* or for any particular *nominated
purpose*.
C was not designed for high performance numeric computing, so it is
no disgrace that it isn't _quite_ as well suited to that task as
Fortran, which _was_ designed for high performance numeric computing.
Fortran was not designed for implementing operating systems, so it is
no disgrace that it (F95) isn't _quite_ as well suited to that task
as C, which _was_ designed for implementing operating systems.
C is good enough to stand on its own merits without people telling
lies about it.
--
John �neas Byron O'Keefe; 1921/02/04-1997/09/27; TLG,TLTA,BBTNOTL.
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` Richard A. O'Keefe
@ 1997-10-06 4:00 ` Graham Hughes
1997-10-07 4:00 ` William Clodius
` (2 subsequent siblings)
3 siblings, 0 replies; 43+ messages in thread
From: Graham Hughes @ 1997-10-06 4:00 UTC (permalink / raw)
-----BEGIN PGP SIGNED MESSAGE-----
>>>>> "Richard" == Richard A O'Keefe <ok@goanna.cs.rmit.edu.au> writes:
Richard> I think perhaps it is time instead that _you_ took your
Richard> blinkers off. Fortran is not my favourite language by a long
Richard> way, but it has come a *long* way in the last 20 years, and
Richard> is by most criteria a more 'modern' language than C.
Well, that's partly because F90/95 really isn't the same language as
F77.
Certain language communities evolve in different ways; the Wirth crowd
tends to invent new languages with different names but similar M.O.'s
(Pascal->Modula 2->Ada|Oberon), LISP reinvents itself with different
semantics but almost exactly the same syntax, and Fortran invents new
languages and calls them the same thing. Note that both Fortran and
LISP are longer lived than anything out there, so this may not be an
entirely bad thing....
What was the epigram? ``I don't know what language we'll be using in
2030, but I know it'll be called FORTRAN?''
- --
Graham Hughes <graham.hughes@resnet.ucsb.edu> / Never attribute to malice that
MIME OK, PGP preferred / which can adequately be
http://A31147.resnet.ucsb.edu/~graham/ / explained by stupidity.
/ -- Hanlon's Razor
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface
iQCVAwUBNDnLziqNPSINiVE5AQEp1wP+LTa1OFoS+oBQxei5lQnu7RUUDUqe2kbt
FeNcuZyri5IL8D9qvjdG9hssfly0FbAQ5Pe34Cvy2MIav4FVc3XTtdtN1UTGVsoc
pKc2nS06sjXiFXlrGmWo8XEliaZy3piIKGIOSdcjaUPFeNxzJVfq/8BHSdjQI0QB
oo2J/Ey6XDM=
=Bd4P
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-06 4:00 ` Richard A. O'Keefe
@ 1997-10-06 4:00 ` boo
1997-10-07 4:00 ` Carlie Coats
` (3 more replies)
0 siblings, 4 replies; 43+ messages in thread
From: boo @ 1997-10-06 4:00 UTC (permalink / raw)
Richard A. O'Keefe wrote:
> C was not designed for high performance numeric computing, so it is
> no disgrace that it isn't _quite_ as well suited to that task as
> Fortran, which _was_ designed for high performance numeric computing.
>
> Fortran was not designed for implementing operating systems, so it is
> no disgrace that it (F95) isn't _quite_ as well suited to that task
> as C, which _was_ designed for implementing operating systems.
Oh puh-leeze.
Who cares what it was designed for? C is far more powerful than
Fortran, especially for the kind of work that some of us
do in the real world. If Rob can show me how to do something
with a particular compiler that speeds up what I need done,
I am listening to him, not to you.
Time to dismount that Ivory Tower of yours.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` Carlie Coats
@ 1997-10-07 4:00 ` Paul Hsieh
1997-10-07 4:00 ` boo
0 siblings, 1 reply; 43+ messages in thread
From: Paul Hsieh @ 1997-10-07 4:00 UTC (permalink / raw)
On 7 Oct 1997 12:53:16 -0400, Carlie Coats (xcc@hilbert.ncsc.org) said:
> This from an advocate of a language that makes arrays second class
> citizens? C can't even do the equivalent of
>
> SUBROUTINE S( M, N, P, A )
> INTEGER, INTENT( IN ): M, N, P
> REAL, INTENT( IN ): A( M, N, P )
> ...
>
> nor can C++, for that matter. Fortran can. So can lisp.
Excuse the rest of us C/C++ biggots who don't know the F90 syntax, but
what does the above syntax signify?
--
Paul Hsieh
http://www.geocities.com/SiliconValley/9498/mailme.html
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` Greg Weeks
@ 1997-10-07 4:00 ` Martin Rodgers
[not found] ` <343AAE5A.A3FCC9D@no.informatik.spam.tu-muenchen.thanks.de>
1 sibling, 0 replies; 43+ messages in thread
From: Martin Rodgers @ 1997-10-07 4:00 UTC (permalink / raw)
Greg Weeks wheezed these wise words:
> |> Which egg orientation do you prefer?
>
> Big Endian.
Anyone unsure what we're talking about should read:
<URL:http://www.jaffebros.com/lee/gulliver/bk1/chap1-4.html>
--
<URL:http://www.wildcard.demon.co.uk/> You can never browse enough
Please note: my email address is gubbish
assert(got(coat)).
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` Martin Rodgers
@ 1997-10-07 4:00 ` Greg Weeks
1997-10-07 4:00 ` Martin Rodgers
[not found] ` <343AAE5A.A3FCC9D@no.informatik.spam.tu-muenchen.thanks.de>
0 siblings, 2 replies; 43+ messages in thread
From: Greg Weeks @ 1997-10-07 4:00 UTC (permalink / raw)
In article <MPG.ea44c489d7d2d98989ad7@news.demon.co.uk>, mcr@this_email_address_intentionally_left_crap_wildcard.demon.co.uk (Martin Rodgers) writes:
|> Serge Pachkovsky wheezed these wise words:
|>
|> > Who cares what it was designed for? Fortran is far more powerful than
|> > C, especially for the kind of work that some of us do in the real world.
|>
|> Which egg orientation do you prefer?
Big Endian.
Greg Weeks
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-06 4:00 ` boo
@ 1997-10-07 4:00 ` Carlie Coats
1997-10-07 4:00 ` Paul Hsieh
1997-10-07 4:00 ` Final kick at the "Merced Guessing Game" Serge Pachkovsky
` (2 subsequent siblings)
3 siblings, 1 reply; 43+ messages in thread
From: Carlie Coats @ 1997-10-07 4:00 UTC (permalink / raw)
In article <34392537.AA4A9F96@tonys.ecology.umn.edu>,
boo <boo@tonys.ecology.umn.edu> wrote:
| Richard A. O'Keefe wrote:
| > C was not designed for high performance numeric computing, so it is
| > no disgrace that it isn't _quite_ as well suited to that task as
| > Fortran, which _was_ designed for high performance numeric computing.
| >
| > Fortran was not designed for implementing operating systems, so it is
| > no disgrace that it (F95) isn't _quite_ as well suited to that task
| > as C, which _was_ designed for implementing operating systems.
|
| Oh puh-leeze.
|
| Who cares what it was designed for? C is far more powerful than
| Fortran, especially for the kind of work that some of us
| do in the real world. If Rob can show me how to do something
| with a particular compiler that speeds up what I need done,
| I am listening to him, not to you.
|
| Time to dismount that Ivory Tower of yours.
This from an advocate of a language that makes arrays second class
citizens? C can't even do the equivalent of
SUBROUTINE S( M, N, P, A )
INTEGER, INTENT( IN ): M, N, P
REAL, INTENT( IN ): A( M, N, P )
...
nor can C++, for that matter. Fortran can. So can lisp.
_Whose_ ivory tower?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` Graham Hughes
@ 1997-10-07 4:00 ` William Clodius
1997-10-08 4:00 ` Richard A. O'Keefe
` (2 more replies)
1997-10-07 4:00 ` boo
1997-10-08 4:00 ` Gregg E Economou
3 siblings, 3 replies; 43+ messages in thread
From: William Clodius @ 1997-10-07 4:00 UTC (permalink / raw)
Richard A. O'Keefe wrote:
> <snip>
> >Who cares what it was designed for? C is far more powerful than
> >Fortran, especially for the kind of work that some of us
> >do in the real world.
>
> I strongly suspect that you don't know what modern Fortran is like.
> There is precisely *one* construction present in C which is not
> supported as well or better by Fortran, and that is pointer arithmetic.
> <snip>
F90 also lacks pointers to procedures. It lacks stream based I/O. (There
are contexts where non-advancing I/O is not sufficient.)
--
William B. Clodius Phone: (505)-665-9370
Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815
PO Box 1663, MS-C323 Group office: (505)-667-5776
Los Alamos, NM 87545 Email: wclodius@lanl.gov
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` boo
@ 1997-10-07 4:00 ` William Clodius
0 siblings, 0 replies; 43+ messages in thread
From: William Clodius @ 1997-10-07 4:00 UTC (permalink / raw)
boo wrote:
>
> Richard A. O'Keefe wrote:
> > I strongly suspect that you don't know what modern Fortran is like.
> > There is precisely *one* construction present in C which is not
> > supported as well or better by Fortran, and that is pointer arithmetic.
>
> And you think this is a minor difference?
>
I suspect he considers it to be a major advantage, for Fortran.
> <snip>
>
> What I do with my C++/C/assembly combination, you cannot possibly
> do with Fortran.... as quickly and easily as I do. I work in the
> virtual reality field, with parallel algorithms, gigabyte databases
> and realtime 3D OpenGL animation, and some serious number crunching
> too. The most heavily used routines I code in C with a little
> inline assembly (which is quick enough to do for any CPU once you
> have a little practice). What do you do? Simple number crunching
> of the style done in the 60's and 70's? Sure, Fortran will suffice!
> <snip>
It is relatively easy to find out what Richard O'Keefe does, check his
news postings using Dejanews (http://www2.dejanews.com/), I suspect you
might find his postings to comp.std.c to be of particular interest, also
check his web page (http://www.cs.rmit.edu.au/%7Eok), note Richard
should remove the trailing semicolon from his signature. While Richard
has done some number crunching, his interests primarilly lies elsewhere:
teaching, algorithms (parallel and sequential), databases, logic
programming, functional programming, language design, and language
implementation.
If Richard comments on an aspect of a language pay attention! I have
read knowledgeable comments from him on Ada (83 & 95), Algol 68, APL, C
(K&R & ISO), C++, Clean, Fortran (77, 90, & HPF), Lisp, Mercury, Pascal
(Standard, Extended, & Borland), Perl, Prolog, S, Scheme, and Sisal.
Comments that indicate that he has both thoroughly read the
documentation and used implementations for all of the above languages.
Further, he has worked on compilers for at least two languages: Prolog
and a dialect of S. He has claimed to have experience with 100+
languages, and I believe him. If you think he has said something that is
incorrect look closely: you probably read too quickly, but it might be a
rare case of ambiguity or (obvious) opinion that is not labeled as such.
--
William B. Clodius Phone: (505)-665-9370
Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815
PO Box 1663, MS-C323 Group office: (505)-667-5776
Los Alamos, NM 87545 Email: wclodius@lanl.gov
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` Paul Hsieh
@ 1997-10-07 4:00 ` boo
1997-10-08 4:00 ` Carlie Coats
0 siblings, 1 reply; 43+ messages in thread
From: boo @ 1997-10-07 4:00 UTC (permalink / raw)
On 7 Oct 1997 12:53:16 -0400, Carlie Coats (xcc@hilbert.ncsc.org) said:
> > This from an advocate of a language that makes arrays second class
> > citizens? C can't even do the equivalent of
> >
> > SUBROUTINE S( M, N, P, A )
> > INTEGER, INTENT( IN ): M, N, P
> > REAL, INTENT( IN ): A( M, N, P )
> > ...
> >
> > nor can C++, for that matter. Fortran can. So can lisp.
Oh, so you think that high level language constructs are
something to boast about?
How about
#include <LifeTheUniverseAndEverything.h>
int main(void){
SolveMyProblem();
return 0;
}
Can yours do that? That header file I included contains the
prototypes for the functions I like the most, in my
own particular implementation of C. Is this high level
enough for you?
Paul added:
> Excuse the rest of us C/C++ biggots who don't know the F90 syntax, but
> what does the above syntax signify?
I suspect it says something about how the data ("arrays") should
be laid out in memory, and says something about how you are
going to access it, to help the compiler out. In other
words, let the compiler do the thinking, and let the
programmer concentrate on the abstract stuff. This kind
of thing is possible in a simple language like Fortran.
To the original poster: If I know something about the
architecture of the machine you are using (such as a T3E, for
example), I could write some nodal C code with inline
assembly or optimized C (with some non-standard
code, perhaps) that will thrash your high level Fortran code
any day. I may have to use my noggin a little to figure
out the best way to lay the problem out, but that is ok.
Of course, you most likely will get your code running
before I do.... and THAT precisely is where the power
of Fortran is. Of course, Fortran is also ideal for people
who don't quite "get all the pointer nonsense in C"
(probably the biggest stumbling block that sends people
scurrying back to Fortran, basic, pascal, etc.).
boo
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-06 4:00 ` boo
1997-10-07 4:00 ` Carlie Coats
1997-10-07 4:00 ` Final kick at the "Merced Guessing Game" Serge Pachkovsky
@ 1997-10-07 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` Graham Hughes
` (3 more replies)
1997-10-08 4:00 ` James C. Stutts
3 siblings, 4 replies; 43+ messages in thread
From: Richard A. O'Keefe @ 1997-10-07 4:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]
boo <boo@tonys.ecology.umn.edu> writes:
>Oh puh-leeze.
>Who cares what it was designed for? C is far more powerful than
>Fortran, especially for the kind of work that some of us
>do in the real world.
I strongly suspect that you don't know what modern Fortran is like.
There is precisely *one* construction present in C which is not
supported as well or better by Fortran, and that is pointer arithmetic.
Modules? Fortran has them, C hasn't.
Overloading? Fortran has it, C hasn't.
Records? Fortran and C both have them.
Pointers? Fortran and C both have them.
Dynamic allocation? Fortran and C both have them.
Recursive procedures? Fortran and C both have them.
Nested procedures? Fortran has one level of nesting, C has none.
Strings? Fortran has them, C hasn't.
Character-oriented IO? Fortran and C both have it.
Record-oriented IO? Fortran has it, C hasn't.
User defined operators? Fortran has them, C hasn't.
Free-format source form? Fortran and C both have it.
Bitwise operations? Fortran and C both have them.
Control over record layout? Neither language supports this. (Yes, I know
about bitfields, and I also know how extremely weak are the
guarantees you get about them.)
>If Rob can show me how to do something
>with a particular compiler that speeds up what I need done,
>I am listening to him, not to you.
Why shouldn't you listen to both of us? I am, after all, telling the truth,
as you can easily verify for yourself.
>Time to dismount that Ivory Tower of yours.
I think perhaps it is time instead that _you_ took your blinkers off.
Fortran is not my favourite language by a long way, but it has come
a *long* way in the last 20 years, and is by most criteria a more
'modern' language than C.
--
John �neas Byron O'Keefe; 1921/02/04-1997/09/27; TLG,TLTA,BBTNOTL.
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-06 4:00 ` boo
1997-10-07 4:00 ` Carlie Coats
@ 1997-10-07 4:00 ` Serge Pachkovsky
1997-10-07 4:00 ` Martin Rodgers
[not found] ` <61cv5e$qn$6@vixen.cso.uiuc.edu>
1997-10-07 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 ` James C. Stutts
3 siblings, 2 replies; 43+ messages in thread
From: Serge Pachkovsky @ 1997-10-07 4:00 UTC (permalink / raw)
boo (boo@tonys.ecology.umn.edu) wrote:
: Oh puh-leeze.
: Who cares what it was designed for? C is far more powerful than
: Fortran, especially for the kind of work that some of us
: do in the real world.
Oh puh-leeze.
Who cares what it was designed for? Fortran is far more powerful than
C, especially for the kind of work that some of us do in the real world.
Cheese,
/Serge.P
--
Russian guy from the Zurich university...
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` Final kick at the "Merced Guessing Game" Serge Pachkovsky
@ 1997-10-07 4:00 ` Martin Rodgers
1997-10-07 4:00 ` Greg Weeks
[not found] ` <61cv5e$qn$6@vixen.cso.uiuc.edu>
1 sibling, 1 reply; 43+ messages in thread
From: Martin Rodgers @ 1997-10-07 4:00 UTC (permalink / raw)
Serge Pachkovsky wheezed these wise words:
> Who cares what it was designed for? Fortran is far more powerful than
> C, especially for the kind of work that some of us do in the real world.
Which egg orientation do you prefer?
--
<URL:http://www.wildcard.demon.co.uk/> You can never browse enough
Please note: my email address is gubbish
assert(got(coat)).
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` Graham Hughes
1997-10-07 4:00 ` William Clodius
@ 1997-10-07 4:00 ` boo
1997-10-07 4:00 ` William Clodius
1997-10-08 4:00 ` Gregg E Economou
3 siblings, 1 reply; 43+ messages in thread
From: boo @ 1997-10-07 4:00 UTC (permalink / raw)
Richard A. O'Keefe wrote:
> I strongly suspect that you don't know what modern Fortran is like.
> There is precisely *one* construction present in C which is not
> supported as well or better by Fortran, and that is pointer arithmetic.
And you think this is a minor difference?
>
> Modules? Fortran has them, C hasn't.
> Overloading? Fortran has it, C hasn't.
> Records? Fortran and C both have them.
> Pointers? Fortran and C both have them.
> Dynamic allocation? Fortran and C both have them.
> Recursive procedures? Fortran and C both have them.
> Nested procedures? Fortran has one level of nesting, C has none.
> Strings? Fortran has them, C hasn't.
> Character-oriented IO? Fortran and C both have it.
> Record-oriented IO? Fortran has it, C hasn't.
> User defined operators? Fortran has them, C hasn't.
> Free-format source form? Fortran and C both have it.
> Bitwise operations? Fortran and C both have them.
> Control over record layout? Neither language supports this. (Yes, I know
> about bitfields, and I also know how extremely weak are the
> guarantees you get about them.)
Ever heard of C++?
Hahaha! Now I get it! This is a troll! Nobody could possibly
think this is a serious reply.
What I do with my C++/C/assembly combination, you cannot possibly
do with Fortran.... as quickly and easily as I do. I work in the
virtual reality field, with parallel algorithms, gigabyte databases
and realtime 3D OpenGL animation, and some serious number crunching
too. The most heavily used routines I code in C with a little
inline assembly (which is quick enough to do for any CPU once you
have a little practice). What do you do? Simple number crunching
of the style done in the 60's and 70's? Sure, Fortran will suffice!
> I think perhaps it is time instead that _you_ took your blinkers off.
> Fortran is not my favourite language by a long way, but it has come
> a *long* way in the last 20 years, and is by most criteria a more
> 'modern' language than C.
I happen to have used modern variants of Fortran, I'll have you
know. Fortran has its place, certainly. It is possible to produce
very efficient code with a high level language that is easy to
master. But outside the realm of brain-dead number crunching, it
cannot compare with efficient C++/C.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-08 4:00 ` William Clodius
@ 1997-10-08 4:00 ` Stanley Chow
0 siblings, 0 replies; 43+ messages in thread
From: Stanley Chow @ 1997-10-08 4:00 UTC (permalink / raw)
In article <343BA412.167E@lanl.gov>,
William Clodius <wclodius@lanl.gov> wrote:
>
>F90 has this capability. This is typically implemented as a pointer to a
>procedure and can be used to emulate some of the capabilities that you
>want from pointers to procedures, but it is not an explicit pointer to a
>procedure. [...]
>IF ... THEN
> C => A
>ELSE
> C => B ! All subsequent invocations of C actually invoke B
>ENDIF
>...
>y = C(z) ! Invokes A or B
I would call this "Procedure Variables" as opposed to "Pointers to
Procedures". I consider procedure variables to be fairly safe (as
these things go) compared to pointers to procedures.
The usual need is for proc vars, and it is a vast overkill (with
dangerous consequences) to force users to implement proc vars via
pointers.
>This is equivalent to C pointers to procedures, and is roughly what is
>planned for F200x. In the most general case, you want procedures to
>return pointers to procedures as values, i.e., a form of closures. This
>is not currently planned.
Not all closures are good.
--
Stanley Chow; schow@nortel.ca, (613) 763-2831
Nortel/BNR, PO Box 3511 Station C, Ottawa, Ontario
Me? Represent other people? Don't make them laugh so hard.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` William Clodius
@ 1997-10-08 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` William Clodius
[not found] ` <y4wwjon203.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>
1997-10-09 4:00 ` William Clodius
2 siblings, 2 replies; 43+ messages in thread
From: Richard A. O'Keefe @ 1997-10-08 4:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]
William Clodius <wclodius@lanl.gov> writes:
>F90 also lacks pointers to procedures.
True. As someone who is peeved with the oddly restricted function
pointers in Ada95, I *should* have remembered this one. Mind you,
function pointers in C are seriously restricted too.
>It lacks stream based I/O.
I am not quite certain what you mean by this.
If you mean the kind of thing that is found in C,
then I have a printed copy of the specification for stream-based IO in
Fortran somewhere in this office.
>(There
>are contexts where non-advancing I/O is not sufficient.)
Agreed.
Remember though, that the context of this thread was
- hardware and optimisation
- limited or not by common programming languages?
An important thing to understand is that if you are seriously concerned
about high performance and reliability, a language may be as useful for
what it _doesn't_ allow as for what it does.
--
John �neas Byron O'Keefe; 1921/02/04-1997/09/27; TLG,TLTA,BBTNOTL.
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` Richard A. O'Keefe
` (2 preceding siblings ...)
1997-10-07 4:00 ` boo
@ 1997-10-08 4:00 ` Gregg E Economou
1997-10-08 4:00 ` David Chase
1997-10-08 4:00 ` Richard A. O'Keefe
3 siblings, 2 replies; 43+ messages in thread
From: Gregg E Economou @ 1997-10-08 4:00 UTC (permalink / raw)
In article <61c9kl$94l$1@goanna.cs.rmit.edu.au>,
Richard A. O'Keefe <ok@goanna.cs.rmit.edu.au> wrote:
>
>I strongly suspect that you don't know what modern Fortran is like.
>There is precisely *one* construction present in C which is not
>supported as well or better by Fortran, and that is pointer arithmetic.
I strongly suspect you dont know what C is like. Go read K&R.
>Modules? Fortran has them, C hasn't.
C is very simple, and designed such that you can implement things of
a higher nature with it if you wish. You can write code that
behaves in a particular style in C.
>Overloading? Fortran has it, C hasn't.
one legitimate arguemtn in a cast of many pointless ones. touche.
(need an accent-grave there)
>Records? Fortran and C both have them.
>Pointers? Fortran and C both have them.
>Dynamic allocation? Fortran and C both have them.
You're confusing issues of the library with the language.
That migth be fine in an HLL like Fortran but in C the library
is not part of the language, even if it is standardized and commonly
accepted.
>Recursive procedures? Fortran and C both have them.
>Nested procedures? Fortran has one level of nesting, C has none.
>Strings? Fortran has them, C hasn't.
But C is lower-level. You can *implement* those things inside a C progam
if you like, but dont have to take on the extra weight if you dont.
Much more flexible.
>Character-oriented IO? Fortran and C both have it.
>Record-oriented IO? Fortran has it, C hasn't.
C has NO I/O. All I/O in the C libraries is implemented using the
basics of the langugae itself in manipulating memory directly. There is
no I/O native to the language. There is almost nothing beyond the
basics of memory handling, logic, and conditionals in the language itself.
The fact that C is used for such a wide variety of things is testimony to
the incredible flexibility it has by NOT being bound to things liek I/O.
>User defined operators? Fortran has them, C hasn't.
>Free-format source form? Fortran and C both have it.
>Bitwise operations? Fortran and C both have them.
>Control over record layout? Neither language supports this. (Yes, I know
> about bitfields, and I also know how extremely weak are the
> guarantees you get about them.)
see above.
>
>Why shouldn't you listen to both of us? I am, after all, telling the truth,
>as you can easily verify for yourself.
only a truth that is based on misdirection. You are obviously mistaken as
to what C is and what the C libraries are, and are mixing the two fo them up.
>I think perhaps it is time instead that _you_ took your blinkers off.
>Fortran is not my favourite language by a long way, but it has come
>a *long* way in the last 20 years, and is by most criteria a more
>'modern' language than C.
a point to be thought of- Fortan is a high level language, C is not.
The utility of C is that it is very universally portable and applicable-
because the laguage itself assumes only the presence of memory, a processing
capability to perform logical and arithmetic operations, and the ability
to perform conditional executions. The manipulation of memory is the
implementation of almost all higher-level fucntionality in the C libraries.
The beauty fo this is that it ends up that C programs very closely resemble
the actual activity fo the machine and low-level routines with a high-level
structure and syntax, and lead to a much simpler and more portabel coding than
an assembly lends, but is still very close down there to the hardware.
However, it is not ncessarily the best thing for _every_ job. For example,
renaming a list of files would be much simpler to accomplish with a short shell
script, and would be much more logically done that way than with a C program
designed explicitly for such a purpose.
anwyays.. lets NOT start another language war, eh?
isildur
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-08 4:00 ` Gregg E Economou
@ 1997-10-08 4:00 ` David Chase
1997-10-08 4:00 ` Richard A. O'Keefe
1 sibling, 0 replies; 43+ messages in thread
From: David Chase @ 1997-10-08 4:00 UTC (permalink / raw)
Gregg E Economou wrote:
> ... The manipulation of memory is the
> implementation of almost all higher-level functionality in the C libraries.
> The beauty of this is that it ends up that C programs very closely resemble
a rat's nest of memory and functional unit latency.
> anwyays.. lets NOT start another language war, eh?
Why should the last word be given to someone who so clearly doesn't
know what he is talking about? Or were you just trolling?
--
David Chase, chase@world.std.com
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-08 4:00 ` Gregg E Economou
1997-10-08 4:00 ` David Chase
@ 1997-10-08 4:00 ` Richard A. O'Keefe
1 sibling, 0 replies; 43+ messages in thread
From: Richard A. O'Keefe @ 1997-10-08 4:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5338 bytes --]
geest3+@pitt.edu (Gregg E Economou) writes:
>I strongly suspect you dont know what C is like. Go read K&R.
I have been using C since the days when UNIX V6+ was the latest thing.
I've fixed bugs in two C compilers.
I've bought and read three copies of the C standard (they keep disappearing
from my office; I'm getting sick of it),
and have obtained and read every publically available document about C9x.
(I was writing a proposal to add offset types to C, but didn't get it
finished in time to submit it to the committee. Sigh. It'd sure make
putting linked structures in shared memory easier.)
>>Modules? Fortran has them, C hasn't.
>C is very simple, and designed such that you can implement things of
>a higher nature with it if you wish. You can write code that
>behaves in a particular style in C.
If you think C is simple, you probably haven't seen the insides of a
C compiler. And you are going to have a nasty shock when C9X comes out.
>You're confusing issues of the library with the language.
>That migth be fine in an HLL like Fortran but in C the library
>is not part of the language, even if it is standardized and commonly
>accepted.
Clearly you have never participated in any of the threads about this
in comp.std.c. The C `library' *is* an official part of the language;
malloc() is as standard as &; sqrt() is as standard as +. (Technically,
there are two kinds of
>But C is lower-level. You can *implement* those things inside a C progam
>if you like, but dont have to take on the extra weight if you dont.
>Much more flexible.
>C has NO I/O.
Wrong. stdio is a fully standard part of C. getc() is as standard
as x = *p++.
>The fact that C is used for such a wide variety of things is testimony to
>the incredible flexibility it has by NOT being bound to things liek I/O.
If you want to talk about C being useful for 8051s you are right.
If you are talking about C systems running on Macs, PCs, UNIX boxes,
MVS, CMS, VMS, BeOS, AmigaDOS, then you are talking through your hat.
>only a truth that is based on misdirection. You are obviously mistaken as
>to what C is and what the C libraries are, and are mixing the two fo them up.
Obviously? I think perhaps you have not read the standard with due care
and attention.
>a point to be thought of- Fortan is a high level language, C is not.
>The utility of C is that it is very universally portable and applicable-
>because the laguage itself assumes only the presence of memory, a processing
>capability to perform logical and arithmetic operations, and the ability
>to perform conditional executions.
Oh dear. There are so many misconceptions here that it is hard to know
where to start.
Take the B6700 mainframes (now the A series).
*Lovely* machines. Fortran runs *beautifully* on them, as do
COBOL and Pascal. There _is_ a C compiler for them now, but
the implementors had to fight past C's utterly inappropriate
assumptions about memory. Heck, C wasn't even a good fit to the PC,
thanks to its extremely strong assumptions about memory.
C in practice does not merely assume the PRESENCE of memory,
it demands a FLAT, LINEAR, BYTE-ADDRESSED memory.
There have been plenty of machines with segmented (PC) or tree-structured
(B6700) memories. There have been plenty of machines with word-addressed
memories. The first MIPS designs didn't have byte loads and stores.
The first Alphas didn't have byte loads or stores. I don't remember
which models of the AMD29k if any have byte loads and stores, but the
oldest ones didn't.
While the C _standard_ doesn't say that NULL pointers are all bits zero,
there are enough C programs out there that rely on this that one manufacturer
(Prime) had to add special instructions just for C to their computers.
Those same computers had supported Fortran, COBOL, Pascal, and even PL/I
just fine.
Indeed, I once ran into trouble porting a C program to a machine which
was just your ordinary average M68k UNIX box _except_ that the user's
half of the address space was the _negative_ half, and large chunks of
the code relied on user addresses looking positive when you cast them
to long. "Very universally portable?" I think not.
I'm trying to bring this thread back into relevance to comp.arch, which
is where I am reading it.
The basic point I want to make is that for *most* (not all) tasks, if you
want efficiency, you want a *high* level language, not an old low level
language. Why? Because hardware has changed a lot in the last 20 years
too. On a good modern machine, load/store can be a HUNDRED TIMES SLOWER
than an add (UltraSPARC II: 4-way superscalar, it's fairly easy to fill
all the slots in vector code with a bit of unrolling, load from main
memory is 30 cycles, 30*4 = 120).
There are plenty of tasks where a low level language is just right,
and C is a welcome step up from assembler. (Programming an 8051 is an
area that forcibly suggests itself.) But writing a program that is a
good fit to _this_ year's machine is a good way to end up with a program
that is relatively slow on _next_ year's machine.
Compiler writers are doing truly _awesome_ things these days. I for one
would rather not get in their way.
--
John �neas Byron O'Keefe; 1921/02/04-1997/09/27; TLG,TLTA,BBTNOTL.
Richard A. O'Keefe; RMIT Comp.Sci; http://www.cs.rmit.edu.au/%7Eok
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` boo
@ 1997-10-08 4:00 ` Carlie Coats
[not found] ` <343C3737.5435@Japan.NCR.com>
0 siblings, 1 reply; 43+ messages in thread
From: Carlie Coats @ 1997-10-08 4:00 UTC (permalink / raw)
In article <343AF933.6EF4EC37@tonys.ecology.umn.edu>,
boo <boo@tonys.ecology.umn.edu> blathers:
> On 7 Oct 1997 12:53:16 -0400, Carlie Coats (xcc@hilbert.ncsc.org) said:
> > > This from an advocate of a language that makes arrays second class
> > > citizens? C can't even do the equivalent of
> > >
> > > SUBROUTINE S( M, N, P, A )
> > > INTEGER, INTENT( IN ): M, N, P
> > > REAL, INTENT( IN ): A( M, N, P )
> > > ...
> > >
> > > nor can C++, for that matter. Fortran can. So can lisp.
>
> Oh, so you think that high level language constructs are
> something to boast about?
"High level constructs"? Since when is being able to do decent
things with (multi-dimensional) arrays high level? Maybe instead
I should have said
<RANT>
When I'm programming in C or C++, why the *_hell_* can't
I do easy things like
void foo( const int m,
const int n,
const int p,
float a[p][n][m] ) {...}
This idiocy about all subscripting except the outermost
being required to be compile-time constant is really and
truly _brain-dead_!
</RANT>
Would that satisfy you?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-08 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 ` William Clodius
@ 1997-10-08 4:00 ` William Clodius
1 sibling, 0 replies; 43+ messages in thread
From: William Clodius @ 1997-10-08 4:00 UTC (permalink / raw)
Richard A. O'Keefe wrote:
>
> William Clodius <wclodius@lanl.gov> writes:
> <snip>
> >It lacks stream based I/O.
>
> I am not quite certain what you mean by this.
> If you mean the kind of thing that is found in C,
> then I have a printed copy of the specification for stream-based IO in
> Fortran somewhere in this office.
> <snip>
This is low on the list of priorities for F200x, but still on the list
of priorities. In principle Fortran I/O remains record based. For files
that do not have a fixed record size, (or for which backspace does not
make sense, i.e., standar I/O to a terminal) the execution of any given
read or write statement cannot assume that it will not be followed by a
backspace command. As a result the file must retain some construct that
indicates the size of the record. For non-record based systems, e.g.,
UNIX this is (invariably) implemented by having an integer at the start
and end of the record indicating the size of the record. For writing a
file to be read by other systems this is a minor problem, but for
reading files produced by other processors, e.g., C, the absence of the
starting integer in the file causes no ends of problems. It is also a
problem for interfacing to hardware, e.g., instumentation, although an
appropriate Fortran specified interface that does not rely on READs or
WRITEs can be an acceptable, if sometimes non-intuitive, substitute.
Most vendors I believe offer this as an extension.
--
William B. Clodius Phone: (505)-665-9370
Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815
PO Box 1663, MS-C323 Group office: (505)-667-5776
Los Alamos, NM 87545 Email: wclodius@lanl.gov
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
[not found] ` <y4wwjon203.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>
@ 1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` Stanley Chow
0 siblings, 1 reply; 43+ messages in thread
From: William Clodius @ 1997-10-08 4:00 UTC (permalink / raw)
Jan Vorbrueggen wrote:
>
> William Clodius <wclodius@lanl.gov> writes:
>
> > F90 also lacks pointers to procedures.
>
> Is that true? Then it isn't a superset of F77 anymore. Or is the way you can
> pass the address of a function or subroutine in F77 not a pointer to a
> procedure?
> <snip>
F90 has this capability. This is typically implemented as a pointer to a
procedure and can be used to emulate some of the capabilities that you
want from pointers to procedures, but it is not an explicit pointer to a
procedure. In priciple in F90 terms you want something like
INTERFACE
FUNCTION A(x)
REAL :: A, x
END FUNCTION A
FUNCTION B(x)
REAL :: A, x
END FUNCTION B
END INTERFACE
INTERFACE(A), POINTER ::C ! define a pointer that accepts real arguments
! and returns real results
IF ... THEN
C => A
ELSE
C => B ! All subsequent invocations of C actually invoke B
ENDIF
...
y = C(z) ! Invokes A or B
This is equivalent to C pointers to procedures, and is roughly what is
planned for F200x. In the most general case, you want procedures to
return pointers to procedures as values, i.e., a form of closures. This
is not currently planned.
--
William B. Clodius Phone: (505)-665-9370
Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815
PO Box 1663, MS-C323 Group office: (505)-667-5776
Los Alamos, NM 87545 Email: wclodius@lanl.gov
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-08 4:00 ` Richard A. O'Keefe
@ 1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` William Clodius
1 sibling, 0 replies; 43+ messages in thread
From: William Clodius @ 1997-10-08 4:00 UTC (permalink / raw)
One other thing that F90 lacks, that C and F95 provide, is the ability
to define a NULL pointer. This, of course, was perhaps the major problem
with F90.
--
William B. Clodius Phone: (505)-665-9370
Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815
PO Box 1663, MS-C323 Group office: (505)-667-5776
Los Alamos, NM 87545 Email: wclodius@lanl.gov
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-06 4:00 ` boo
` (2 preceding siblings ...)
1997-10-07 4:00 ` Richard A. O'Keefe
@ 1997-10-08 4:00 ` James C. Stutts
3 siblings, 0 replies; 43+ messages in thread
From: James C. Stutts @ 1997-10-08 4:00 UTC (permalink / raw)
In article <34392537.AA4A9F96@tonys.ecology.umn.edu>, boo <boo@tonys.ecology.umn.edu> writes:
<snip>
>Oh puh-leeze.
>
>Who cares what it was designed for? C is far more powerful than
>Fortran, especially for the kind of work that some of us
>do in the real world. If Rob can show me how to do something
>with a particular compiler that speeds up what I need done,
>I am listening to him, not to you.
It's the little touches in Fortran that set it apart from C for
numerical work. For instance: math.h doesn't give you
the ability to raise an int to an arbitrary power and return
an int. Pow() only returns floats. Minor things like that.
Actually having an operator (like ** in Fortran) for this
would also be nicer, IMHO, than pow().
Regards,
----------------------------------------------------------------------
James C. Stutts stuttjc@eng.auburn.edu
Adaptive Aerostructures Lab, Department of Aerospace Engineering
211 Aerospace Engineering W: (334)-844-6813
Auburn University, AL 36849 Lab: (334)-844-6832
All opinions expressed are my own.
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
[not found] ` <61cv5e$qn$6@vixen.cso.uiuc.edu>
@ 1997-10-08 4:00 ` William Clodius
0 siblings, 0 replies; 43+ messages in thread
From: William Clodius @ 1997-10-08 4:00 UTC (permalink / raw)
Mark Gibson wrote:
> <snip>
>
> Wow, I haven't used FORTRAN much in at least ten years. (F77 was new
> when I last did any real work with FORTRAN.) All this fuss over
> which is better, C or FORTRAN, has made me curious. Is there a low-priced,
> high quality implementation of the most modern version of FORTRAN?
Depends on your definition of low priced/high quality. For most people
the answer is no, for some with deep pockets or a restricted range of
emphasis for quality, the answer is yes.
A full F90 highly optimizing implementation is almost invariably
relatively high cost: $300 for a stuent Wintel, $600 professional
Wintel, about twice that for UNIX. With full toolsets, i.e., debugers,
editors, integrated environment, special libraries, another factor of
two or more in price can be introduced.
There are low optimizing compilers, I believe Salford is one, in the
$100 range. There are F90 subset compilers (i.e., they are not supersets
of F77) from Lahey (ELF) and Imagine1 (F), available for free or the
$100 range. The subset compilers are primarilly intended for the
educational market, and will often not be appropriate for professionals.
> Does
> Gnu produce such a thing?
No although G77 does implement some of F90 (e.g. SELECT CASE) it does
not implement modules, pointers, array arithmetic, etc.
>
> Also, what native support for large-integer arithmetic do the latest
> versions of FORTRAN provide? Will they allow me to crunch 128-bit
> integers efficiently without writing my own arithmetic routines?
Processor dependent, but relatively easy to use if available. I believe
some vendors for 64 bit machines offer this capability, several of them
offer 128 bit REALs.
> <snip>
--
William B. Clodius Phone: (505)-665-9370
Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815
PO Box 1663, MS-C323 Group office: (505)-667-5776
Los Alamos, NM 87545 Email: wclodius@lanl.gov
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: C language
[not found] ` <343C3737.5435@Japan.NCR.com>
@ 1997-10-09 4:00 ` Craig Burley
[not found] ` <61jc3i$h2q$1@sue.cc.uregina.ca>
0 siblings, 1 reply; 43+ messages in thread
From: Craig Burley @ 1997-10-09 4:00 UTC (permalink / raw)
Eric Hildum <Eric.Hildum@Japan.NCR.com> writes:
> To put it bluntly, C is not a high level language. It is a syntactically
> nice PDP 11/70 assembly language. That is all it was intended to be.
> That it is useful outside that domain is more a credit to the PDP
> instruction set designers than K & R.
>
> As a language, C is relatively poor, for example, the stupid overloading
> of the keyword static.
Yeah, but, C is a great *tool*. It's *such* a great tool that
because it, like awk, sed, perl, make, tar, and so on,
necessarily defines an input "language" in the comp.sci (formal
language) sense, the inexperienced conclude that it is a great
*language*.
Fortran comes from an older tradition when formal languages were
less understood, and artificial languages (my term for true languages
designed to meet artificial, e.g. technological, needs, covering
computer languages and stuff like GUIs) even less so. As such,
it didn't show the benefits of good formal-language design (e.g.
nobody can say what "X(Y)=Z" really means in Fortran without
knowing the context, and this does confuse programmers in practice),
but it also didn't show the disadvantages of formal-language
design techniques (e.g. the arrogance that says "if I can write a
small-enough yacc input file for my language, it is therefore a
Good Language").
Yet, despite my long decades of distate for Fortran, the more I've
learned about what constitutes good *language* design, the more I've
had to conclude that, for scientific/numeric processing, Fortran
not only *was* a better language in its day than C in *its*, but it
(Fortran 90) is *today* a better language than C *today*. (And C++
is even worse a language than C. At least programmers know what
`a = b + c;' means in C.)
The essential lesson I finally learned was:
Formal languages are to languages what mathematics is to music.
I think the creation of the term "formal language" itself was a
mistake, because it misleads the audience into thinking that *some*
kind of language is being described, in a useful sense, but in fact
"formal language" encompasses much more than the tiny portion of the
generally useful term "language" than is connoted by the term, in
much the same sense that "formal music" would have been a poor term
instead of "mathematics".
So we end up with "brilliant" C programmers who assume that, because
C is (mistakenly) called a "language", and because C is a great *tool*,
it is a good language, and since Fortran isn't such a great tool,
it must be a lesser language, when the opposite is true.
At least, that's what happened to me. I learned about formal languages
(and aced a .400 course on "Computability, Formal Languages, and
Automatons" or some such thing in my one and only semester as a
college student) when I was 17.5-18.1 years old, but I'd already had
a fair amount (for a kid anyway ;-) experience designing artificial
languages before having the theoretical grounding.
So, for years, probably well over a decade, I, too, mistakenly thought
that since I understood the *mechanics* of language design (that is,
I could construct formal languages, understood how to avoid ambiguities,
write parsers, and so on), I knew all I needed to know to properly
assess computer languages on their merits, perhaps even design one myself.
Then it began to dawn on me, as the years went by and I dealt with
programming bugs (my own and others, since I've usually been one of
the "known skilled debuggers" wherever I've worked), among other stuff,
that an understanding of the mechanics of artificial languages was about
as definitive a basis for assessing the languages themselves as
an understanding of the mechanics of tone reproduction is for assessing
the quality of Bach, Mozart, Beethoven, et al. Both are useful skills,
but they do *not*, by themselves give the person possessing those skills
the viewpoint necessary to assess the higher, more complex aspects of
design and composition.
Having worked on a variety of compilers and operating systems at this
point, probably 80% of the relevant code being *considered* "written
in C", it is pretty amazing to me to hear people talk about what a
great language C is when, for even the most trivial stuff, we must
go effectively "outside" the language. Using preprocessor macros
*starts* to go outside the language (consider how ineffective
"#define SUM(a,b) a+b" and "#define MUL(a,b) a*b" are in connoting
what a programmer *means* given the possible occurrence of an expression
such as "d = MUL(SUM(e,f),g);"), but resorting to stuff like
#include "tree.def" and #include "rtl.def" as gcc does, and, further,
resorting to Lisp-like code to "express" how a "low-level" machine
works (clarifying the statement "C is a good low-level language"; it
*is* a good low-level *tool*) as gcc also does in its machine
descriptions, shows how *poor* a language C is at doing *ordinary*
things. Heck, its lousy string processing is probably a major
reason why so many tools (that in some classic systems would be
written in BASIC or even FORTRAN) are written in *sh* in the UNIX
world! And there's still much more disagreement about, and widespread
poor use of, the proper use of #include than there seems to be about
how to use INCLUDE or MODULE/USE in Fortran, modules in Ada, and
so on.
I mean, even ancient Fortran had (poorly designed, due to looking
too much like assignments) statement functions like "SUM(A,B)=A+B"
and "MUL(A,B)=A*B". Get the types right ("REAL MUL", for example),
and it's much harder to accidentally write broken code using these
in Fortran -- e.g. "D = MUL(SUM(E,F),G)" will actually *work*,
unlike the C version of all this as shown above.
The C bigots' typical response to the C version of this? "Well,
you're *supposed* to put *parentheses* around the macro's dummy
arguments!" Right. That's what makes it a poor language -- if
someone forgets to do it, only a *highly experienced* C programmer
is likely to notice the bug. (Yes, Fortran has some gotchas
like this, too, mostly due to its ancient lack of orthagonality,
something for which C, at least, has no excuse.)
By understanding the science/art of *artifical language design* we
have a better chance of recognizing, perhaps designing, effective
new languages for expressing what a computer is expected to do
in a way readers are least likely to misunderstand and computers
(compilers, etc.) most likely to implement efficiently.
And, of course, computer architecture design is, in practice,
*quite* dependent on the designs of, and assumptions made by users
of, artificial languages.
The legions of "C bigots", by which I mean those who think C is
a great *language* ("better than that stupid Fortran!"), will
contribute little towards a future of more powerful, clean,
reliable, and efficient computing, because they don't understand
the issues -- yet. (And the lemmings still walking off the C++
cliff certainly won't either.)
However, until the public stops buying mediocre, buggy software,
and/or the computer architects (Intel, Digital, Sun, and so on)
can no longer give us 2x speedups every few months or so, there
probably won't be enough pressure to design new languages
correctly.
So, while I think someday we *will* need SWYM (Say What You Mean)
technology in artificial-langauge design, for the time being,
economic and technological forces continue to push hard for GISS
(Get It Shrinkwrapped, Stupid), which is why C is still so popular.
--
"Practice random senselessness and act kind of beautiful."
James Craig Burley, Software Craftsperson burley@gnu.ai.mit.edu
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-07 4:00 ` William Clodius
1997-10-08 4:00 ` Richard A. O'Keefe
[not found] ` <y4wwjon203.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>
@ 1997-10-09 4:00 ` William Clodius
1997-10-10 4:00 ` Larry Kilgallen
2 siblings, 1 reply; 43+ messages in thread
From: William Clodius @ 1997-10-09 4:00 UTC (permalink / raw)
Fortran currently also lacks a standard defined preprocessor. This may,
or may not, be viewed as a problem for Fortran. The received wisdom on
preprocessors is that they can help performance and portability, but
their effect on code maintenance and legibility may not be worth the
price. For example, Denis Ritchie at the HOPL II conference (as quoted
in the latest issue of SIGPLAN) had several criticisms of cpp.
Common substitutes for this lack are cpp (Fortran syntax unaware), m4
(Fortran syntax unaware), CoCo (a conditional compilation code (no
macros) with Fortran like syntax that will probably be part of F200x),
and fpp (a Fortran syntax aware variant of cpp that was proposed as an
alternative to Coco by Sun as standardizing current practice).
--
William B. Clodius Phone: (505)-665-9370
Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815
PO Box 1663, MS-C323 Group office: (505)-667-5776
Los Alamos, NM 87545 Email: wclodius@lanl.gov
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: C vs. Fortran - Perl wins
[not found] ` <61jc3i$h2q$1@sue.cc.uregina.ca>
@ 1997-10-09 4:00 ` Nick Maclaren
1997-10-09 4:00 ` Craig Burley
1997-10-14 4:00 ` Richard A. O'Keefe
1997-10-18 4:00 ` Tom
2 siblings, 1 reply; 43+ messages in thread
From: Nick Maclaren @ 1997-10-09 4:00 UTC (permalink / raw)
In article <61jc3i$h2q$1@sue.cc.uregina.ca>,
John Bayko <bayko@pollux.cs.uregina.ca> wrote:
>
> But the reason for C's popularity (theory #514) is because it was
>the first language to treat pointers conveniently. Granted, pointers
>are also the cause of a great many bugs and abuses, but they were a
>necessary step towards objects, and could be implemented efficiently
>on the computers of limited speed back then.
> In other words, C's pointers made possible complex programs using
>intricate data structures, while other languages only allowed this
>indrectly or implicitly.
My dear sir! Oh my dear sir! While you are right that C belongs to the
class of languages that treats pointers 'conveniently', to describe it
as the first is a gross terminological inexactitude.
Let me draw your attention (gently) to BCPL (C's grandparent) and Algol 68
(whose name suggests a date earlier than C) and point out that these were
nowhere near the first languages to support such constructions.
Nick Maclaren,
University of Cambridge Computer Laboratory,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email: nmm1@cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: C vs. Fortran - Perl wins
1997-10-09 4:00 ` C vs. Fortran - Perl wins Nick Maclaren
@ 1997-10-09 4:00 ` Craig Burley
1997-10-10 4:00 ` Richard A. O'Keefe
1997-10-13 4:00 ` Roger Barnett
0 siblings, 2 replies; 43+ messages in thread
From: Craig Burley @ 1997-10-09 4:00 UTC (permalink / raw)
nmm1@cus.cam.ac.uk (Nick Maclaren) writes:
> In article <61jc3i$h2q$1@sue.cc.uregina.ca>,
> John Bayko <bayko@pollux.cs.uregina.ca> wrote:
> >
> > But the reason for C's popularity (theory #514) is because it was
> >the first language to treat pointers conveniently. Granted, pointers
> >are also the cause of a great many bugs and abuses, but they were a
> >necessary step towards objects, and could be implemented efficiently
> >on the computers of limited speed back then.
> > In other words, C's pointers made possible complex programs using
> >intricate data structures, while other languages only allowed this
> >indrectly or implicitly.
>
> My dear sir! Oh my dear sir! While you are right that C belongs to the
> class of languages that treats pointers 'conveniently', to describe it
> as the first is a gross terminological inexactitude.
>
> Let me draw your attention (gently) to BCPL (C's grandparent) and Algol 68
> (whose name suggests a date earlier than C) and point out that these were
> nowhere near the first languages to support such constructions.
I don't know about John's *intent*, but I took his use of "conveniently"
in a more general sense, one that might well make his statement correct.
First, BCPL, as a grandparent of C, doesn't really discount his argument
anyway, but...
...second, my sense is that when the "programming explosion" began
to happen, when portability across a wide number of machines mattered,
and when the programs were doing more iron-level things like OSes,
compilers, and so on, C *was* the first *convenient* language that allowed
manipulation of pointers that were, semantically, much like the
underlying machines' pointers.
I think that's likely to be at least one of the major reasons, if not
*the* major reason, that the programmers involved in the programming
explosion of the '70s and '80s tended to fall into the "well" of C.
Personally, having done these kinds of programming in a variety of
assembler languages, BASIC, FORTRAN, PL/I, and C, there's no question
in my mind that C was the best tool for the job. I've had to fight
it, sure, but nowhere near the degree to which I had to to write my code
in an even-remotely-legible way (assembler and Fortran looked really
bad here), fight to gain access to the underlying iron (BASIC, FORTRAN,
and, *except* for pointers, even PL/I bad here), and have some assurance
I wasn't magically invoking tons of unrelated code to do a trivial
thing (BASIC and PL/I bad here, and now of course C++).
The fight I remember going on over these issues back then was really
Pascal vs. C, because Pascal was the "other" language that offered
convenient access to pointers -- again, assuming "convenient" included
"not vastly expensive to put a decent compiler up on a new macine",
which is why PL/I, and presumably Algol variants, didn't make the
grade.
Pascal lost, because it didn't offer quite enough portability for
the low-level things programmers of these near-iron apps tended to
want to do, but not, IMO, because it was a worse language, because
it (probably) wasn't. It was a worse tool for the needs of the
new programming explosion, especially the one that included portability
across machines (which, say, Apollo didn't have to worry about, so they
probably enjoyed their choice of Pascal -- until it came time to port
their software to new architectures anyway).
So I think John's point is quite a good one, even though, as with almost
every "de facto" standard product, the features that are claimed to make
it "unique" or "a first" really weren't actually introduced by that
product -- but were *seemingly* so introduced by virtue of being the
first product with those things that was available and convenient to
access when the need for those features began to be widely recognized.
Along the same lines, the Mac didn't have the first GUI, but it seemed
like it did when affordable GUIs began to be appreciated and affordable.
In a sense, the Mac did for GUIs what C did for pointers and floating-
point math -- made access to these things much more convenient and
affordable than the other, perhaps more noble, efforts tried to or,
more certainly, succeeded at doing. Similarly, if Java wins out, it
won't be because it's the first, or even best, effort at a "truly
portable language [with useful library baggage]", rather because it's
the *right* effort at the *right* time and price point. And don't
get me started about the IBM PC and Microsoft produces. ;-)
Now, keep in mind that, during much of the time these issues were
*really* being thrashed out, I was at Pr1me, a world unto itself,
mostly, that took its architectural and linguistic cues from an
entirely different base -- namely, FORTRAN, PL/I, and Multics, plus
doses and dashes of other stuff here and there. C wasn't even a blip
on the radar screen when the P400 architecture was conceived,
especially for a vendor that cared a lot more about shipping a
wide performance range of compatible machines than about writing
a lot of software that'd port to alien machines. (And, in the end,
that cost Pr1me dearly, I think.) So most of what I know about all
this is from my attempts at figuring out "what happened!?" when I
moved from Pr1me to the UNIX/Internet world over a period of years
starting in the mid-'80s.
Getting back to Perl, that is definitely one tool I want to learn, and
pretty soon. I doubt I'll find it a Great Language, but I'm pretty
sure I'll find it a decent language and a Truly Great Tool, given how
many people seem to find it so already -- or I'll learn a lot more
by figuring out why it doesn't quite make the grade, should that turn
out to be the case (but I hope it doesn't).
--
"Practice random senselessness and act kind of beautiful."
James Craig Burley, Software Craftsperson burley@gnu.ai.mit.edu
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
[not found] ` <343AAE5A.A3FCC9D@no.informatik.spam.tu-muenchen.thanks.de>
@ 1997-10-09 4:00 ` Torben AEgidius Mogensen
[not found] ` <EHsr7B.Dt8@bit3.com>
0 siblings, 1 reply; 43+ messages in thread
From: Torben AEgidius Mogensen @ 1997-10-09 4:00 UTC (permalink / raw)
Bernd Paysan <paysan@no.informatik.spam.tu-muenchen.thanks.de> writes:
>If you compare language evolution
>with biologic evolution, we are just in the midth of the carbonic
>explosion of forms. Most languages known today won't survive on the long
>run, but there will be one small and unregarded with an early form of a
>backbone, and this one will take over later.
And the year 2000 problem is the giant meteor that will kill off the
dinosaurs? ;-)
Actually, I think the metaphorical meteor will be something else. As
has been noted earlier in this thread, tehre is a limit to how much
high-level languages can give you: You still have to tell the computer
exactly what you want done, and there is no way this description can
be arbitrarily shortened.
However, a lot of programming time today is taken with tracking down
bugs. Languages that will make this process easier/faster is bound to
win in the long run. One way is to remove sources of common bugs by
restricting the language. Common bugs in C are caused by the use of
integers to represent booleans. This makes mistakes like "if (x=y)"
pass the compiler, when a better type system would detect that an
integer was used in place of a boolean. This is only a simple example,
which b.t.w. many C complers will detect and give a warning (not an
error) about. Other things that a good language with a good comipler
can outlaw or catch are non-exhaustive tests, undefined variables,
out-of-bounds access and many more. We are probably only in the
beginning of an evolution towards languages/compilers that catch
inconsistent behaviours.
The trend today seems to try to reduce the programming effort by
providing HUGE libraries and hope that these will cover the majority
of what programs need. This can make some programs be quite short, but
if what you want isn't in the library, then you are out of luck.
Furthermore, this trend makes it take a long time to use a language
well, as most of the effort is taken by learning the libraries. Even
experienced programmers spend a major fraction of the programming time
reading manuals or searching in libraries. I think this trend will die
under its own weight. Libraries are not bad in themselves, but they
shouldn't dominate.
Torben Mogensen (torbenm@diku.dk)
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: C vs. Fortran - Perl wins
1997-10-10 4:00 ` Richard A. O'Keefe
@ 1997-10-10 4:00 ` David Gay
1997-10-10 4:00 ` Craig Burley
1 sibling, 0 replies; 43+ messages in thread
From: David Gay @ 1997-10-10 4:00 UTC (permalink / raw)
In article <61kjsd$i4r$1@goanna.cs.rmit.edu.au> ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) writes:
(Oh yeah, for anyone who doesn't know, ESPL was another early SIL
with *much* better pointer facilities than C has ever had, including
pointers that could be tied to specific areas and the ability to allocate
in stack frames; not just in your own stack frame as in alloca(), but also
the ability to allocate in your _caller's_ stack frame, an idea which has
been reinvented under the name 'region analysis', if I've got that right).
In systems based on region analysis programmers don't explicitly
allocate in any particular stack "frame", instead they just allocate
as usual and the compiler works out in which stack frame each
allocation should live (and this isn't restricted to the current or
previous stack "frame"). The stack "frames" are generally called
regions (they obviously aren't of a fixed size), so the whole memory
management system looks like a stack of regions.
--
David Gay - Yet Another Starving Grad Student
dgay@cs.berkeley.edu
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
[not found] ` <EHsr7B.Dt8@bit3.com>
@ 1997-10-10 4:00 ` Torben AEgidius Mogensen
0 siblings, 0 replies; 43+ messages in thread
From: Torben AEgidius Mogensen @ 1997-10-10 4:00 UTC (permalink / raw)
brianh@bit3.com writes:
>In article <61i74j$8b1@vidar.diku.dk>,
>Torben AEgidius Mogensen <torbenm@diku.dk> wrote:
>>
>>Actually, I think the metaphorical meteor will be something else. As
>>has been noted earlier in this thread, there is a limit to how much
>>high-level languages can give you: You still have to tell the computer
>>exactly what you want done, and there is no way this description can
>>be arbitrarily shortened.
>It depends upon how abstract you want to get. Inverting a matrix (to pick
>a particularlly well trod example) is ~100 lines of C code, or a couple
>hundred to a few thousand lines of assembler, or simply a call to
>invert_matrix().
Just calling a library function like invert_matrix() only helps you if
it is already there. If you want to do something new, then you must
write it yourself, and there is a limit to how short you can do this.
Libraries rely on the assumption that you rarely want to do something
new, and as long as this is true (and the libraries are not so huge
that it would be faster to write it yourself instead of searching the
libraries), it is fine. But This is not always so.
>>The trend today seems to try to reduce the programming effort by
>>providing HUGE libraries and hope that these will cover the majority
>>of what programs need. This can make some programs be quite short, but
>>if what you want isn't in the library, then you are out of luck.
>>Furthermore, this trend makes it take a long time to use a language
>>well, as most of the effort is taken by learning the libraries. Even
>>experienced programmers spend a major fraction of the programming time
>>reading manuals or searching in libraries. I think this trend will die
>>under its own weight. Libraries are not bad in themselves, but they
>>shouldn't dominate.
>Okay, first off, I don't beleive in manualless programming. Even for a
>small, simple language like C I keep both K&R and two books on the standard
>libraries within arms reach when I program, and hot-keyed help on my
>computer (or man, if I'm on Unix).
I don't object to manuals, I use them too. However, if you use more
time to read manuals than you do on design, then something is wrong.
Torben Mogensen (torbenm@diku.dk)
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: C vs. Fortran - Perl wins
1997-10-10 4:00 ` Richard A. O'Keefe
1997-10-10 4:00 ` David Gay
@ 1997-10-10 4:00 ` Craig Burley
1 sibling, 0 replies; 43+ messages in thread
From: Craig Burley @ 1997-10-10 4:00 UTC (permalink / raw)
ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) writes:
> Craig Burley <burley@tweedledumb.cygnus.com> writes:
> >...second, my sense is that when the "programming explosion" began
> >to happen, when portability across a wide number of machines mattered,
> >and when the programs were doing more iron-level things like OSes,
> >compilers, and so on, C *was* the first *convenient* language that allowed
> >manipulation of pointers that were, semantically, much like the
> >underlying machines' pointers.
>
> "Convenient" will have to be defined fairly carefully.
That was indeed my point, actually, but you've supplied the details
(and more pertinent ones) much better than I did in my attempt.
> It was the contrast between PL/I and C that first taught me a major
> lesson: STRINGS ARE WRONG. One of the few lessons from that era which
> I still find valid.
Well, strings are right when what you have are strings: that is,
a collection of characters typed in by a user, or a report being
prepared for output. PL/I was the easiest of the languages I worked
with for serious projects. What I learned from PL/I is that there's
a big difference between "natural" and "obvious". To the PL/I designers,
it was natural that "a = b + c;" meant, when all three variables were
strings, to convert b and c to numbers (by assuming they were encoded
in decimal), add them, then convert the result to a string (again,
decimal). That's natural to some people, not to others, so it isn't
obvious; C++ proves this by making the "other" obvious choice, where
the same statement means an entirely different thing (concatenate the
two strings). But I think we've had this discussion before, on
comp.compilers, a few months back.
I agree that using strings where trees and such are appropriate is
"wrong".
> >Now, keep in mind that, during much of the time these issues were
> >*really* being thrashed out, I was at Pr1me, a world unto itself,
> >mostly, that took its architectural and linguistic cues from an
> >entirely different base -- namely, FORTRAN, PL/I, and Multics, plus
> >doses and dashes of other stuff here and there.
>
> I have written assembly code for a P400. Terminally weird, I say.
> (The programmers at Auckland University wanted a PDP-11/70 running
> UNIX. What we _got_ was a flaky P400 -- never get the first model
> of a machine in your country, waiting for parts from another country
> is such a pain -- with an operating system that really wanted to be
> running on a P300 and only grudgingly admitted that there was another
> instruction set that could access more memory. The Fortran compiler
> was written in assembly code. I tried to fix a problem with it and
> got completely lost. A truly _horrible_ machine to write assembly for.
Hmm, I enjoyed it quite a bit. I admit, after learning assembly on
PDP-8s, -10s, and -11s, plus an early 4-bit micro (4040 or some such
thing), the P400 was a bit of a shock. And, unlike the guy who
maintained the Cobol compiler when I first arrived there, I never did
memorize the machine instructions (that is, I have no idea what the
actual encodings of P400 instructions were, whereas I can still remember
that the half-word instructions on the -10 were "5xx", and some
-8s instructions like 0=AND).
I've admitted before, though, that having already done P400 means I
don't feel any impulse to do ix86 assembly. They're quite similar
in their terminal weirdnessicity. I much prefer VLIW and superscalar
RISC, but really don't get much opportunity to do clever stuff in
assembly anymore.
However, I was pretty amazed to find out, recently, that the SPARCv8
ABI *didn't* bias the stack pointer since, in effect, the P400 one
did a couple of decades ago! (The SPARCv9 64-bit ABI will -- I
asked. ;-) So in some ways the P400 instruction set did reflect
some serious engineering and thought, though usually the kind that
didn't care a lot about orthagonality.
> >C wasn't even a blip
> >on the radar screen when the P400 architecture was conceived,
> >especially for a vendor that cared a lot more about shipping a
> >wide performance range of compatible machines than about writing
> >a lot of software that'd port to alien machines.
>
> Possibly the world's worst editor, especially with the cheap glass
> TTYs they sold us where the return key stuttered. An interpreted
> Basic (the compiled Basic came later and we couldn't afford it),
> with Fortran and COBOL as the compiled languages. No Pascal. No
> Algol. No SIL. An architecture that had borrowed from Multics
> and an operating system that hadn't. Stack instructions which
> misbehaved if you crossed a page boundary.
I don't remember the page boundary problem, but it sounds like you
were suffering through the rev 15, 16, and 17 versions of PRIMOS,
which, I suppose, posed some problems (although we got lots of work
done using them). The Multics aspects of PRIMOS didn't really appear
until around 18 and especially 19.4. But, transparent network file
access? PRIMOS had that starting at 17.something, IIRC, and had
a pretty darn fast implementation as well, especially in the rewrite
circa 18 (again, IIRC). In fact, for a while, it looked as if Prime's
big claim to fame was *real* networking (for its day), using token
ring and transparent file access as the basic mechanisms, though there
were some problems (authorization, for example) that they didn't seem
interested in solving, and no useful user apps (email, print spooling,
batch subsystems) they were really interested in providing that
exploited the great networking.
Regarding the editor, yeah, it was bad, but I got pretty proficient
using it in combination with COMINPUT and COMOUTPUT (PRIMOS' versions
of "sh" and "... > foo") to do pretty wild things. What I didn't
like about the editor was that there was no ability to set up
default configuration to do things like *change* how you switched
between INPUT and EDIT modes (since, as you point out, hitting RETURN
at the beginning of a line was often *not* what Real Users wanted
to mean "switch mode").
> Prime's glossy brochures at the time had pictures of toy steam
> engines. We made rather sarcastic comments about how appropriate
> they were.
Boy, that brings back memories!
> We never did figure out how come a machine with semiconductor memory
> and a Fortran compiler written in assembler could be so much slower
> at compiling Fortran than a machine with a ferrite core memory and a
> Fortran compiler written in Algol. But it was.
Dunno what you're comparing it to, but Prime 400/500 were, essentially,
super-minis. If you're comparing it to a mainframe, that would explain
a lot, especially the larger investment in software done by the mainframe
vendor. I'd guess your facility bought the P400 because it cost a lot
less (or, if it was truly worse, because they were kinda dumb ;-).
Back then, starting around late 1978 or so IIRC, Prime's ran SPSS.
At the time, that was considered pretty impressive for a "mini" --
at least in-house, the explanation I was given was that, even though
the SPSS port effort wasn't paid for by SPSS licenses, the mere fact
that salesfolk could demo SPSS running on Primes sold a whole bunch
of machines to people who, otherwise, had no interest in SPSS itself.
So, for *some* people, it was *not* a poor performer at the price point.
I guess that's obvious, since there couldn't be *that* many stupid
people with lots of money to keep Prime in the black for so many
years, but your comments made it seem like Prime's were Just Plain
Slower than their competition, which I don't believe was the case.
> Has anyone written up a history of Prime? I should think it would be
> compelling reading for anyone interested in computer architecture.
> They tried to handle compatibility the onion way. Every time they
> ran into a restriction in the current architecture (like addressibility)
> they'd invent another, and ship a machine that could support _all_ the
> previous architectures as well. For the P500, they had a really clean
> 360-ish instruction set, but most of the software used one of the other
> four or five instruction sets, at least at the time we lost interest in
> Prime (Primos 19 vintage). From the outside, it really did seem as if
> the hardware people and the software people never talked to each other,
> and the software people never talked to the application developers, and
> _nobody_ was doing any long-term planning. I really think a technical
> history of the Primes would make a fascinating and instructive book.
The P500's new instruction set (called 32I mode) wasn't *really* all
that clean, IIRC, and the fact that it wasn't well supported meant that
we didn't particular care to try to use it in-house. But it was certainly
cleaner than anything else Prime had at the time (namely, the other
modes, which are [chant with me now ;-]: 16S, 32S, 32R, 64R, and 64V).
The hw and sw people *used* to talk to each other all the time -- in fact,
that was a "selling point" for new hires (like me), that the compiler
people would talk with the hw people about what instructions were most
important.
But, I think the huge success of Prime circa 1978-1980 and other things
led to a loss of high-level technical focus. Certainly that less was
evident by 1982, when new management took over. Poduska left around
that time, but had seemed (to us in the trenches) not to be
interested in the overall technical focus in the company for years
anyway. So during 79-82, it felt to me like we were no longer one,
focused, group of people doing our separate jobs; rather, we were
each little, independent groups each with our *own* technical focus and
priorities, and that probably included the hw department(s) as well,
which increasingly were being told what to do by marketing rather than
the sw people.
When the new management came in in 1982, they quickly started solving
a bunch of longstanding problems in fine fashion (they fortified the
long-ailing Tech Pubs group, and generally improved lots of the
support systems like Education), but they also pretty much killed off
any high-level technical focus. Even though I switched to Pubs around
that time (perfect timing for me, actually), the feeling was evident
to me through the engineers I dealt with: Prime had, technically, turned
into an amoeba with different legs trying to go in different, rather
fuzzy, directions, which ultimately pulled apart the "center" (which
had been a single line of compatible processors from the low to high
end) and the company itself. Foundering on one or two shoddy products
(like the externally-supplied but black-hole-for-internal-bugfixing-
resources Office Automation System) didn't help, of course.
But as far as the P400 instruction set and philosophy, as far as I'm
concerned, the Intel x86 series is pretty much just a P400 with
market share.
Wish I'd understood more of these things back then, maybe I could have
helped more than just by doing my job. Back around '82 or so, I felt
it was possibly a hindrance that we insisted so much on compatibility,
and felt Digital was making a big mistake by tossing away its old,
fine iron for ubiquituous VAXen. What Digital had that Prime didn't
have was a fairly clear, technical focus at, or near, the top, which
meant that, at least, it was *possible* they'd succeed at doing what
they tried *technically*. The lack of long-term focus really hurt
Prime, because it turns out that focusing all your energy on doing
what will make your quarter-end quotas makes it unlikely you'll end
up doing the new computer architecture the industry will want through
the next decade.
--
"Practice random senselessness and act kind of beautiful."
James Craig Burley, Software Craftsperson burley@gnu.ai.mit.edu
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-10 4:00 ` Larry Kilgallen
@ 1997-10-10 4:00 ` Zalman Stern
1997-10-11 4:00 ` Andrew Cruickshank
1 sibling, 0 replies; 43+ messages in thread
From: Zalman Stern @ 1997-10-10 4:00 UTC (permalink / raw)
Larry Kilgallen (kilgallen@eisner.decus.org) wrote:
: As I understand it, the reliance on preprocessors is actually
: required by the definition of the C language and it is impossible
: to implement a C compiler which uses precompiled interface definitions
: because one is supposed to be able to add definitions before those
: which are "include"ed and have those added definitions affect the
: "include"ed ones.
Many compiler vendors offer solutions to this problem. (Metrowerks
CodeWarrior and Microsofts Visual C++ to name two.) There are varying
levels of "transparency" involved. As with many things (alias analyisis,
building fast x86 implementations) the solution is difficult, but far from
impossible.
A related problem that often comes up in porting large apps is the
semantics of textual inclusion make the "interface dependencies" of C
programs relatively difficult to determine. And the situation gets worse in
development environments where precompiled header information is passed in
on the command line because the C source code then often lacks any mention
of the headers it depends on. Then there's the "mother include file"
syndrome where every source file starts with an include of a single header
which includes every header than might ever be used in the program.
But salvation is close at hand. I understand Merced will have a "compile C
program" instruction. Its only fair given the CDC STAR "compile Fortran
program" instruction. (Or was it TI ASC? SYMBOL? One of those :-))
-Z-
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-09 4:00 ` William Clodius
@ 1997-10-10 4:00 ` Larry Kilgallen
1997-10-10 4:00 ` Zalman Stern
1997-10-11 4:00 ` Andrew Cruickshank
0 siblings, 2 replies; 43+ messages in thread
From: Larry Kilgallen @ 1997-10-10 4:00 UTC (permalink / raw)
In article <343D64F1.167E@lanl.gov>, William Clodius <wclodius@lanl.gov> writes:
> Fortran currently also lacks a standard defined preprocessor. This may,
> or may not, be viewed as a problem for Fortran. The received wisdom on
> preprocessors is that they can help performance and portability, but
> their effect on code maintenance and legibility may not be worth the
> price.
As for performance I have only seen the C preprocessor to hinder
compilation speeds (presumably run-time performance is not the
issue since some combination of libraries and inlining can make
code from sophisticated compilation equal to that from any sort
of preprocessing).
But as for compilation speed, taking a full set of VMS interface
definitions ("Starlet") and using them from C slows down the
compilation _considerably_ compared to compilers like Bliss,
Pascal and Ada which make use of precompiled libraries. DEC
releases a new version of VMS only once a year or so, why should
I recompile the interface definitions every time I compile ?
As I understand it, the reliance on preprocessors is actually
required by the definition of the C language and it is impossible
to implement a C compiler which uses precompiled interface definitions
because one is supposed to be able to add definitions before those
which are "include"ed and have those added definitions affect the
"include"ed ones.
Larry Kilgallen
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: C vs. Fortran - Perl wins
1997-10-09 4:00 ` Craig Burley
@ 1997-10-10 4:00 ` Richard A. O'Keefe
1997-10-10 4:00 ` David Gay
1997-10-10 4:00 ` Craig Burley
1997-10-13 4:00 ` Roger Barnett
1 sibling, 2 replies; 43+ messages in thread
From: Richard A. O'Keefe @ 1997-10-10 4:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 9598 bytes --]
Craig Burley <burley@tweedledumb.cygnus.com> writes:
>...second, my sense is that when the "programming explosion" began
>to happen, when portability across a wide number of machines mattered,
>and when the programs were doing more iron-level things like OSes,
>compilers, and so on, C *was* the first *convenient* language that allowed
>manipulation of pointers that were, semantically, much like the
>underlying machines' pointers.
"Convenient" will have to be defined fairly carefully.
PL/I was and is far from my favourite language, but it _did_ have pointers,
and not only did it have pointers before C existed, C even borrowed syntax
from it (pointer->member). Before C was heard of at Auckland (where I did
BSc and MSc), we had designed two SILs of our own (WEST, my design, and
EAST, the one that was actually implemented). Automation Engineering, an
Auckland company, had _their_ own SIL for M6800s or 6802s, I can't remember
which. These were all pleasant Algol-like languages with pointers and
also with access to machine-specific features. There was the whole Bliss
family. There was MARY. The woods were *full* of systems implementation
languages / machine oriented high level languages. C was merely one of
*many*, and nowhere *near* the first to offer these features conveniently.
No, C's virtue was that it was amongst the *least* specific of the SILs.
You can forget trying to port ESPOL, ESPL, PL-11, PL-516, PL/360, and
you can especially forget trying to port Bliss-10 to anything else.
They were convenient enough; C is better at some things that Bliss, and
worse at some. If you were trying to get close to the metal, they were
_more_ convenient. The thing about C was *within a family of startlingly
similar machines, which family since dominated the market*, C was a
superb compromise between a general purpose language and a systems
implementation language. Some say C rode UNIX's coat-tails to success;
I think both of them rode the coat-tails of the twos-complement,
power-of-two word size, byte addressed, flat address space machines
to success.
In the early 70s, at times it seemed as if _everyone_ was trying to write
an operating system in a high level language (Algol dialects, PL/I dialects,
even Fortran dialects and Pascal dialects). Trouble was, they were all
_dialects_, and the operating systems tended to be specific to the machines
they were written for. The crucial thing that I think made C the success
it has been was that its implementors actually tried to _port_ programs
written in C very early on.
(Oh yeah, for anyone who doesn't know, ESPL was another early SIL
with *much* better pointer facilities than C has ever had, including
pointers that could be tied to specific areas and the ability to allocate
in stack frames; not just in your own stack frame as in alloca(), but also
the ability to allocate in your _caller's_ stack frame, an idea which has
been reinvented under the name 'region analysis', if I've got that right).
If anyone has a spare ESPL manual they don't want any more, I'd love to
re-read it.
>Personally, having done these kinds of programming in a variety of
>assembler languages, BASIC, FORTRAN, PL/I, and C, there's no question
>in my mind that C was the best tool for the job. I've had to fight
>it, sure, but nowhere near the degree to which I had to to write my code
>in an even-remotely-legible way (assembler and Fortran looked really
>bad here), fight to gain access to the underlying iron (BASIC, FORTRAN,
>and, *except* for pointers, even PL/I bad here), and have some assurance
>I wasn't magically invoking tons of unrelated code to do a trivial
>thing (BASIC and PL/I bad here, and now of course C++).
It was the contrast between PL/I and C that first taught me a major
lesson: STRINGS ARE WRONG. One of the few lessons from that era which
I still find valid.
>Pascal lost, because it didn't offer quite enough portability for
>the low-level things programmers of these near-iron apps tended to
>want to do, but not, IMO, because it was a worse language, because
>it (probably) wasn't.
Pascal lost because it was designed as a _teaching_ language and
deliberately restricted. The consequence was that it evolved into
hundreds of mutually incompatible dialects, most of which have
perished. One of the areas where Pascal was very deliberately
restricted in explicit contrast with earlier languages was in
forbidding pointers to automatically allocated variables, which
eliminated a major list-processing idiom used in Algol 68 and
still used in C.
>So I think John's point is quite a good one, even though, as with almost
>every "de facto" standard product, the features that are claimed to make
>it "unique" or "a first" really weren't actually introduced by that
>product -- but were *seemingly* so introduced by virtue of being the
>first product with those things that was available and convenient to
>access when the need for those features began to be widely recognized.
C was delicately poised between (what then passed for) generality and
closeness-to-the-metal, and (what then passed for) good C compilers
were available _free_ to a lot of universities. Heck, you even got
the _source_ code. I've still got a listing of the PDP-11 C compiler,
and if I had had to take a job where there wasn't a C compiler, I was
planning to write one.
These days, our standards of generality have changed dramatically,
and far more importantly, the _scale_ of the projects we work on has
changed dramatically. Limits you can tolerate when the largest program
you can write has to fit into 64k, including stack, static, and heap
data as well as code, are more of a burden when you're dealing with
64k lines of code.
>Now, keep in mind that, during much of the time these issues were
>*really* being thrashed out, I was at Pr1me, a world unto itself,
>mostly, that took its architectural and linguistic cues from an
>entirely different base -- namely, FORTRAN, PL/I, and Multics, plus
>doses and dashes of other stuff here and there.
I have written assembly code for a P400. Terminally weird, I say.
(The programmers at Auckland University wanted a PDP-11/70 running
UNIX. What we _got_ was a flaky P400 -- never get the first model
of a machine in your country, waiting for parts from another country
is such a pain -- with an operating system that really wanted to be
running on a P300 and only grudgingly admitted that there was another
instruction set that could access more memory. The Fortran compiler
was written in assembly code. I tried to fix a problem with it and
got completely lost. A truly _horrible_ machine to write assembly for.
>C wasn't even a blip
>on the radar screen when the P400 architecture was conceived,
>especially for a vendor that cared a lot more about shipping a
>wide performance range of compatible machines than about writing
>a lot of software that'd port to alien machines.
Possibly the world's worst editor, especially with the cheap glass
TTYs they sold us where the return key stuttered. An interpreted
Basic (the compiled Basic came later and we couldn't afford it),
with Fortran and COBOL as the compiled languages. No Pascal. No
Algol. No SIL. An architecture that had borrowed from Multics
and an operating system that hadn't. Stack instructions which
misbehaved if you crossed a page boundary.
Prime's glossy brochures at the time had pictures of toy steam
engines. We made rather sarcastic comments about how appropriate
they were.
We never did figure out how come a machine with semiconductor memory
and a Fortran compiler written in assembler could be so much slower
at compiling Fortran than a machine with a ferrite core memory and a
Fortran compiler written in Algol. But it was.
>Getting back to Perl, that is definitely one tool I want to learn, and
>pretty soon. I doubt I'll find it a Great Language, but I'm pretty
>sure I'll find it a decent language and a Truly Great Tool, given how
>many people seem to find it so already -- or I'll learn a lot more
>by figuring out why it doesn't quite make the grade, should that turn
>out to be the case (but I hope it doesn't).
Perl is truly disgusting and extremely useful. I personally believe
that one of the main problems with Perl is how easy it makes it to
implement the 'simple, obvious, and wrong' solution. (I refer to
strings, of course. For much of the data Perl is used to crunch,
trees are better than strings. Perl 5 makes it _possible_ to process
trees, but far easier to process strings.)
Has anyone written up a history of Prime? I should think it would be
compelling reading for anyone interested in computer architecture.
They tried to handle compatibility the onion way. Every time they
ran into a restriction in the current architecture (like addressibility)
they'd invent another, and ship a machine that could support _all_ the
previous architectures as well. For the P500, they had a really clean
360-ish instruction set, but most of the software used one of the other
four or five instruction sets, at least at the time we lost interest in
Prime (Primos 19 vintage). From the outside, it really did seem as if
the hardware people and the software people never talked to each other,
and the software people never talked to the application developers, and
_nobody_ was doing any long-term planning. I really think a technical
history of the Primes would make a fascinating and instructive book.
--
John �neas Byron O'Keefe; 1921/02/04-1997/09/27; TLG,TLTA,BBTNOTL.
Richard A. O'Keefe; RMIT Comp.Sci; http://www.cs.rmit.edu.au/%7Eok
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-10 4:00 ` Larry Kilgallen
1997-10-10 4:00 ` Zalman Stern
@ 1997-10-11 4:00 ` Andrew Cruickshank
1997-10-12 4:00 ` Paul D. DeRocco
1997-10-13 4:00 ` Michael Williams
1 sibling, 2 replies; 43+ messages in thread
From: Andrew Cruickshank @ 1997-10-11 4:00 UTC (permalink / raw)
Larry Kilgallen wrote:
>
> In article <343D64F1.167E@lanl.gov>, William Clodius <wclodius@lanl.gov> writes:
> > Fortran currently also lacks a standard defined preprocessor. This may,
> > or may not, be viewed as a problem for Fortran. The received wisdom on
> > preprocessors is that they can help performance and portability, but
> > their effect on code maintenance and legibility may not be worth the
> > price.
>
> As for performance I have only seen the C preprocessor to hinder
> compilation speeds (presumably run-time performance is not the
> issue since some combination of libraries and inlining can make
> code from sophisticated compilation equal to that from any sort
> of preprocessing).
>
> But as for compilation speed, taking a full set of VMS interface
> definitions ("Starlet") and using them from C slows down the
> compilation _considerably_ compared to compilers like Bliss,
> Pascal and Ada which make use of precompiled libraries. DEC
> releases a new version of VMS only once a year or so, why should
> I recompile the interface definitions every time I compile ?
>
> As I understand it, the reliance on preprocessors is actually
> required by the definition of the C language and it is impossible
> to implement a C compiler which uses precompiled interface definitions
> because one is supposed to be able to add definitions before those
> which are "include"ed and have those added definitions affect the
> "include"ed ones.
>
> Larry Kilgallen
On PCs pre-compiled header files have been a standard feature for
some time (driven primarily by the requirement to include
Windows header file when Windows 3.0 took off).
The compilers keep a database of precompiled header information
for each source file in a project. If you change the include files
or add definitions ahead of the include files then this is detected
and the precompiled header information is regenerated by the
compiler/preprocessor.
So it's not impossible and it is workable.
-------------------------
Andrew Cruickshank.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-11 4:00 ` Andrew Cruickshank
@ 1997-10-12 4:00 ` Paul D. DeRocco
1997-10-13 4:00 ` Michael Williams
1 sibling, 0 replies; 43+ messages in thread
From: Paul D. DeRocco @ 1997-10-12 4:00 UTC (permalink / raw)
Andrew Cruickshank wrote:
>
> The compilers keep a database of precompiled header information
> for each source file in a project. If you change the include files
> or add definitions ahead of the include files then this is detected
> and the precompiled header information is regenerated by the
> compiler/preprocessor.
"Precompiled headers" is really a misnomer. It's really a symbol
table cache. One of its somewhat counter-intuitive
characteristics is that it's more efficient, in a multi-module
program, to include the same set of headers in every module,
rather than try to figure out the minimum set needed by each
individual module. But I never liked doing that anyway...
--
Ciao,
Paul
(Please remove the extra "crud" from the return address,
which has been altered to foil junk mail senders.)
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: Final kick at the "Merced Guessing Game"
1997-10-11 4:00 ` Andrew Cruickshank
1997-10-12 4:00 ` Paul D. DeRocco
@ 1997-10-13 4:00 ` Michael Williams
1 sibling, 0 replies; 43+ messages in thread
From: Michael Williams @ 1997-10-13 4:00 UTC (permalink / raw)
In article <343F7D9A.C475526E@openkast.demon.co.uk>,
>The compilers keep a database of precompiled header information
>for each source file in a project. If you change the include files
>or add definitions ahead of the include files then this is detected
>and the precompiled header information is regenerated by the
>compiler/preprocessor.
You would hope so.
One time, however, we found a linkage error in an application, which
was due to a (legacy) C library being linked to C++, where the header
for library didn't include extern "C" declarations. Rather than change
the header (which would have openned up a can of worms), we instead
put extern "C" around the #include. The result - it still didn't work
because VC++ had precompiled the header.
> So it's not impossible and it is workable.
That said, yes it is possible, but when it does go wrong, it takes a
while to understand why!
Mike.
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: C vs. Fortran - Perl wins
1997-10-09 4:00 ` Craig Burley
1997-10-10 4:00 ` Richard A. O'Keefe
@ 1997-10-13 4:00 ` Roger Barnett
1 sibling, 0 replies; 43+ messages in thread
From: Roger Barnett @ 1997-10-13 4:00 UTC (permalink / raw)
In article: <y6en5uquyr.fsf@tweedledumb.cygnus.com> Craig Burley
<burley@tweedledumb.cygnus.com> writes:
>
>[snip]
> The fight I remember going on over these issues back then was really
> Pascal vs. C, because Pascal was the "other" language that offered
> convenient access to pointers -- again, assuming "convenient" included
> "not vastly expensive to put a decent compiler up on a new macine",
> which is why PL/I, and presumably Algol variants, didn't make the
> grade.
>
> Pascal lost, because it didn't offer quite enough portability for
> the low-level things programmers of these near-iron apps tended to
> want to do, but not, IMO, because it was a worse language, because
> it (probably) wasn't.
In the UK at that time we also had CORAL (ugh :) ) and RTL/2. The latter
is still quite widespread in certain application areas, but despite being
used in the 1970s and early '80s for systems ranging from process control
(as it was developed at ICI this was its originally intended market) to
radar to Stock Exchange information feeds and realtime executives, its
wider potential had been squashed by the C steamroller by the mid '80s
[ the well known British flair for marketing may also have helped... ]
Mind you, on hearing that one of the things we do is develop RTL/2 tools
I still have people saying to me "oh yes, I remember that one; do you know,
its funny but those RTL/2 programs I wrote always seemed to just work" -
not the kind of endorsement message that sells, unfortunately.
--
Roger Barnett
Natron Software Maintenance Ltd, York, England
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: C vs. Fortran - Perl wins
[not found] ` <61jc3i$h2q$1@sue.cc.uregina.ca>
1997-10-09 4:00 ` C vs. Fortran - Perl wins Nick Maclaren
@ 1997-10-14 4:00 ` Richard A. O'Keefe
1997-10-18 4:00 ` Tom
2 siblings, 0 replies; 43+ messages in thread
From: Richard A. O'Keefe @ 1997-10-14 4:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3200 bytes --]
bayko@pollux.cs.uregina.ca (John Bayko) writes:
> Since then, momentum has kept C popular, while the concept of
>objects was invented which solve the bug problems of C pointers, while
>preserving (or even adding to) the direct ways of manipulating them
>that C introduced.
Anachronism alert: objects *preceded* C.
Note the numbers in 'Simula 67'.
There were elements of OOP in Algol 68: files in Algol 68 had
procedure-valued slots so that an Algol 68 programmer could customise
file behaviour in a per-object fashion.
The ESPOL programming language (the systems implementation language
on the B6700s) had a data structure called 'QUEUE's which were actually
pretty much the same thing as classes; I think the ESPOL design was
pretty much frozen before 1965.
> One thing I think is ironic (kind of)... I've read of many
>projects now being done in Java, where they're being completed in a
>fraction of the time that they would have in C or C++. And the project
>managers are amazed... yet they could have had exactly the same
>productivity boost years ago if they'd switched to something like
>Modula-3, which is basically Java with a different syntax.
Heck, they could have had concurrency, objects, type safe separate
compilation, and a bunch of other things if they had switched to
Simula 67. (Has anyone got a DEC-10 Simula 67 manual they don't
need any more? I'd enjoy the nostalgia.)
> Just imagine the man-centuries of wasted effort... a tribute to
>the lemmingness of mankind.
The snag with Modula-3 and Simula 67 is that project managers don't
go around saying "what's the best language for this? oh dear, the
best language doesn't have the best tools, I'll pay some money to
someone to upgrade the tools". The project managers that are tool-
aware will cheerfully use an inferior language if there are good
tools for it. The economics of developing good tools depend on
both the *cost* of developing the tools (it would be far far easier
to develop good tools for Simula 67 or Modula 3 than for C++) and
on the *market volume* for such tools. The big thing behind Java
is everybody's belief that one day the tools *will* be there.
At the moment, if the experience of some of my students is any
indicator, they aren't. I've had mature students nearly in tears
because their straightfoward Java code *didn't* work the same in
all the browsers (or even at all in some of them). (My current
favourite was last night's demo, where all the labels in the
dialogues came out in white letters on a white background; the
student had not altered the default colours.) This *belief* that
the tools will be there one day is creating a market which ensures
that the tools *will* be there.
The software industry is a perfect illustration of the fact that
the free market is just like Darwinian evolution: it seeks out
*local* optima not *global* optima; the invisible hand is blind.
[One could paraphrase the well-known saying about democracy, and
say that the free market is the worst of economic systems, except
for all the others.]
--
John �neas Byron O'Keefe; 1921/02/04-1997/09/27; TLG,TLTA,BBTNOTL.
Richard A. O'Keefe; RMIT Comp.Sci; http://www.cs.rmit.edu.au/%7Eok
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: C vs. Fortran - Perl wins
[not found] ` <61jc3i$h2q$1@sue.cc.uregina.ca>
1997-10-09 4:00 ` C vs. Fortran - Perl wins Nick Maclaren
1997-10-14 4:00 ` Richard A. O'Keefe
@ 1997-10-18 4:00 ` Tom
2 siblings, 0 replies; 43+ messages in thread
From: Tom @ 1997-10-18 4:00 UTC (permalink / raw)
I work for a company where we've had a similar discussion, only the
combatants are Java v. C. Not being a Java programmer I decided to pick
up a Java text -- which was incidentally loaded with Sun hype.
Lord behold, after reviewing the language I realized many of its
features are the way they are because Java is written in C.
I can only conclude that every language has its purpose.
Tom
^ permalink raw reply [flat|nested] 43+ messages in thread
end of thread, other threads:[~1997-10-18 4:00 UTC | newest]
Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-03 4:00 Final kick at the "Merced Guessing Game" Robert Harley
1997-10-06 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` boo
1997-10-07 4:00 ` Carlie Coats
1997-10-07 4:00 ` Paul Hsieh
1997-10-07 4:00 ` boo
1997-10-08 4:00 ` Carlie Coats
[not found] ` <343C3737.5435@Japan.NCR.com>
1997-10-09 4:00 ` C language Craig Burley
[not found] ` <61jc3i$h2q$1@sue.cc.uregina.ca>
1997-10-09 4:00 ` C vs. Fortran - Perl wins Nick Maclaren
1997-10-09 4:00 ` Craig Burley
1997-10-10 4:00 ` Richard A. O'Keefe
1997-10-10 4:00 ` David Gay
1997-10-10 4:00 ` Craig Burley
1997-10-13 4:00 ` Roger Barnett
1997-10-14 4:00 ` Richard A. O'Keefe
1997-10-18 4:00 ` Tom
1997-10-07 4:00 ` Final kick at the "Merced Guessing Game" Serge Pachkovsky
1997-10-07 4:00 ` Martin Rodgers
1997-10-07 4:00 ` Greg Weeks
1997-10-07 4:00 ` Martin Rodgers
[not found] ` <343AAE5A.A3FCC9D@no.informatik.spam.tu-muenchen.thanks.de>
1997-10-09 4:00 ` Torben AEgidius Mogensen
[not found] ` <EHsr7B.Dt8@bit3.com>
1997-10-10 4:00 ` Torben AEgidius Mogensen
[not found] ` <61cv5e$qn$6@vixen.cso.uiuc.edu>
1997-10-08 4:00 ` William Clodius
1997-10-07 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` Graham Hughes
1997-10-07 4:00 ` William Clodius
1997-10-08 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` William Clodius
[not found] ` <y4wwjon203.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` Stanley Chow
1997-10-09 4:00 ` William Clodius
1997-10-10 4:00 ` Larry Kilgallen
1997-10-10 4:00 ` Zalman Stern
1997-10-11 4:00 ` Andrew Cruickshank
1997-10-12 4:00 ` Paul D. DeRocco
1997-10-13 4:00 ` Michael Williams
1997-10-07 4:00 ` boo
1997-10-07 4:00 ` William Clodius
1997-10-08 4:00 ` Gregg E Economou
1997-10-08 4:00 ` David Chase
1997-10-08 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 ` James C. Stutts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox