home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.edu:1660 comp.lang.fortran:3556 comp.lang.misc:3076 comp.arch:9421 sci.math:11467
- Newsgroups: comp.edu,comp.lang.fortran,comp.lang.misc,comp.arch,sci.math
- Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
- From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: User-Defined Operators (was: Scientists as Programmers (was: Small Language Wanted))
- Message-ID: <9225915.145@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <1992Sep13.022830.2046@CS.ORST.EDU> <1992Sep14.090213.18722@uklirb.informatik.uni-kl.de> <mcdonald.299@aries.scs.uiuc.edu>
- Distribution: na
- Date: Tue, 15 Sep 1992 05:42:27 GMT
- Lines: 53
-
- mcdonald@aries.scs.uiuc.edu (J. D. McDonald) writes:
-
- >kirchner@uklira.informatik.uni-kl.de (Reinhard Kirchner) writes:
- >
- >>If one wants to see and USE a language with user definable operators:
- >
- >>Take Pascal-XSC. It is available on all unix machines since it compiles to
- >>standard C. It allows users to define operators monadic and dyadic, and it
- >>comes with many of them for interval, vector, matrix, complex etc.
- >>computations.
- >
- >However, the results will be no faster .... and almost surely slower,
- >than simply coding in C.
-
- Why "almost surely slower" than C?
- Mr. Kirchner says that the language compiles to standard C;
- I do not see any reason why the C code produced would be likely to be
- worse than writing it in C in the first place.
-
- >What you are describing is **NOT** user definable operators in the sense that
- >they are **needed**!! What is needed is the ability to define operators
- >that map one-to-one to the exact machine operations that are present,
- >to give the fastest possible results.
-
- gcc offers exactly this capability (see the documentation regarding
- "Extended Asm").
- It does not allow the user to introduce arbitrary new operators; however
- it appears likely that using the combination of Pascal-XSC and gcc you
- could achieve what you are after.
-
- >What you describe adds no new capabilities to the language. You would
- >still need assembler to access the full capabilities of the machine.
- >Remember that **NO** langauage can ever add capabilities to assembler,
- >because assembler can do anything. HLLs can only prevent use of
- >things assembler can do.
-
- What about the "capability" to write portable code?
- What about the "capability" to write <application XYZ> in less
- than N lines of code? In less than M hours of programming time?
- For a cost of less than D dollars?
- What about the "capability" to write complex programs that even first year
- students can understand?
-
- If you are arguing that HLLs are not useful, then you are obviously wrong.
- If you are trying to point out that assembler is Turing-complete, then so what?
- In rare situations, it is necessary to use assembler. But for the great
- majority of cases, it is far more cost-effective to use a HLL.
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature virus is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-