home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.edu:1656 comp.lang.fortran:3551 comp.lang.misc:3071 comp.arch:9418 sci.math:11433
- Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!orstcs!orstcs!usenetusenet
- From: crowl@jade.CS.ORST.EDU (Lawrence Crowl)
- Newsgroups: comp.edu,comp.lang.fortran,comp.lang.misc,comp.arch,sci.math
- Subject: Re: User-Defined Operators (was: Scientists as Programmers (was: Small Language Wanted))
- Message-ID: <1992Sep14.205323.8577@CS.ORST.EDU>
- Date: 14 Sep 92 20:53:23 GMT
- Article-I.D.: CS.1992Sep14.205323.8577
- References: <1992Sep13.022830.2046@CS.ORST.EDU> <1992Sep14.090213.18722@uklirb.informatik.uni-kl.de> <mcdonald.299@aries.scs.uiuc.edu>
- Sender: usenet@CS.ORST.EDU
- Distribution: na
- Organization: Oregon State University, Corvallis Oregon
- Lines: 50
- Nntp-Posting-Host: jade.cs.orst.edu
-
- In article <mcdonald.299@aries.scs.uiuc.edu>
- mcdonald@aries.scs.uiuc.edu (J. D. McDonald) writes:
- >In article <1992Sep14.090213.18722@uklirb.informatik.uni-kl.de>
- >kirchner@uklira.informatik.uni-kl.de (Reinhard Kirchner) writes:
- >>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.
-
- This is not necessarily the case. Compilers can better optimize code knowing
- that an operator is "matrix multiplication" and one of its arguments is
- "identity matrix" than it can "bunch of loops and assignments" and "array with
- some ones and zeros". Higher level operations _can_ reduce execution time,
- particularly for parallel computers. They can also make things worse.
-
- >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.
-
- Well, that depends on your goal. If your goal is speed at the cost of ease of
- development, you do what you want. If your goal is ease of development, with
- only modest efficiency, you do something else.
-
- >What you describe adds no new capabilities to the language.
-
- Yes, it does add capability. What it doesn't add is computational power. But
- almost all programming languages are equivalent from that standpoint.
-
- >You would still need assembler to access the full capabilities of the machine.
-
- True, but there is a cost to accessing the full capabilities.
-
- >Remember that **NO** langauage can ever add capabilities to assembler,
- >because assembler can do anything.
-
- Computationally, yes. Expressively, no.
-
- >HLLs can only prevent use of things assembler can do.
-
- Preventing things is also a reasonable goal, if software quality is important
- enought to justify a loss in speed.
-
- --
- Lawrence Crowl 503-737-2554 Computer Science Department
- crowl@cs.orst.edu Oregon State University
- ...!hplabs!hp-pcd!orstcs!crowl Corvallis, Oregon, 97331-3202
-