home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!laphroaig!cflatter
- From: cflatter@nrao.edu (Chris Flatters)
- Subject: Re: Scientists as Programmers (was Re: Smal
- Message-ID: <1992Aug30.232409.15262@nrao.edu>
- Sender: news@nrao.edu
- Reply-To: cflatter@nrao.edu
- Organization: NRAO
- References: <BttB9z.IAy@mentor.cc.purdue.edu>
- Date: Sun, 30 Aug 1992 23:24:09 GMT
- Lines: 43
-
- In article IAy@mentor.cc.purdue.edu, hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
- >This statement is too broad. Modularization is not a problem for the
- >scientist, but it can be a major time-waster if the current software is
- >used. Subroutine calls are, at this time, and for the foreseeable future,
- >quite expensive. This was not the case when Fortran and Algol were first
- >produced; there were few registers then, transfer was the fastest instruction,
- >and context switching cost less than one multiplication.
-
- Subroutine calls are not that expensive. Here are some examples.
-
- function call+return double precision fp operation
- (average time in us) (average time in us)
-
- SPARCstation IPX 0.115 0.146
- 25 MHz 386SX/387SX 1.75 3.37
-
- (IPX timing from Sun C++ 2.1 using -O4; 386SX/387SX timing taken from
- GNU C 1.39 with -O under 386BSD 0.1). Unless the work carried out in
- a subroutine is trivial the overhead of a function call can be discounted.
-
- >I have deliberately violated types to get the job done. In fact, I see no
- >good way out of it. Now there might be some point to informing the programmer
- >that types are violated, but very definitely not to insist on it, or to force
-
- It is rarely necessary to violate type constraints in a strongly typed language.
- When it is necessary it is possible to localize the code that does this. Most
- typesafe languages provide mechanisms to avoid the constraints of the type
- system in these rare cases (eg. the WORD data type in Modula 2).
-
- >Also, mathematicians especially use lots of operators. Despite what the CS
- >gurus say, allowing the introduction of additional functions is not the
- >same thing. Also, mathematicians and scientists are accustomed to using
- >whatever syntax they like, as long as it does not lead to confusion. But
- >the CS people insist that only the standard operators are to be allowed to
- >use infix notation, and all others must be prefix, except in reverse Polish
- >systems, in which all must be postfix.
-
- Restrictions on the introduction of new operators arise from practical
- considerations. The introduction of a new infix operator changes the
- syntax of the language significantly.
-
- Chris Flatters
- cflatter@nrao.edu
-