home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.edu:1510 comp.lang.fortran:3405 comp.lang.misc:2916 comp.arch:9202 sci.math:10928
- Path: sparky!uunet!decwrl!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin
- From: hrubin@pop.stat.purdue.edu (Herman Rubin)
- Newsgroups: comp.edu,comp.lang.fortran,comp.lang.misc,comp.arch,sci.math
- Subject: Re: Scientists as Programmers (was Re: Small Language Wanted)
- Message-ID: <Bu08uF.HBC@mentor.cc.purdue.edu>
- Date: 3 Sep 92 13:44:38 GMT
- References: <1992Sep3.020355.20338@u.washington.edu> <2!ln9fc@lynx.unm.edu> <1992Sep3.112944.20996@dbsun.uucp>
- Sender: news@mentor.cc.purdue.edu (USENET News)
- Distribution: na
- Organization: Purdue University Statistics Department
- Lines: 42
-
- In article <1992Sep3.112944.20996@dbsun.uucp> meyer@dbsun.uucp (Don Meyer) writes:
- >In article <2!ln9fc@lynx.unm.edu> john@aquarius.unm.edu (John Prentice) writes:
- > [ re: C++ and complex numbers ]
- >>Fortunately, you wouldn't need to because the designers were not brain
- >>dead enough to leave in out in the first place :-) .
-
- >'C' was intended as more of a systems language, in which case complex
- >numbers aren't usually needed. C++ extends C without any particular
- >bias towards features for specific applications areas. The philisophy
- >of extending the language via librarys (which can function quite as
- >nicely as built-in features) is a sound one.
- >I would hardly characterize this _considered choice_ as "brain-dead".
-
- This is not brain-dead, but it is certainly brain-damaged. Inlining of
- stuff from libraries has to be done at compile time, or at most at assemble
- time, as at least the compiler needs to know how much space the inlined
- code will take. If every addition, etc., required a subroutine call,
- the computer would run very much slower. So one would have to use
- some type of language extension file at compile time, not libraries.
-
- The present compilers translate such things as +, *, &, etc., into
- some version of assembler. Why not allow the user to say how other
- operations will be similarly translated, and add them to the list?
- These operations often produce temporaries; why not tell the user
- how this is done, and let them be added to the list? These would
- not really complicate the language design or the compiler, except
- insofar as precedence is affected.
-
- Now why did the C designers use the term "typedef" for what should have
- been called "typealias"? I have used Fortran compilers before the creation
- of C which allowed a limited number of user-defined types.
-
- This also affects hardware. It does make a difference in the code for
- a good program what operations are available and how long they take.
- On some machines, multiplication and division have to be programmed.
- There is generally no single algorithm optimal on all machines, so the
- hardware considerations at least have to be known to the programmer.
- --
- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
- Phone: (317)494-6054
- hrubin@pop.stat.purdue.edu (Internet, bitnet)
- {purdue,pur-ee}!pop.stat!hrubin(UUCP)
-