Path: utzoo!attcan!uunet!decwrl!sdd.hp.com!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.misc Subject: Re: Multi-compilers Keywords: design, source Message-ID: <3809@goanna.cs.rmit.oz.au> Date: 24 Sep 90 09:08:15 GMT References: <9009110403.AA03158@csd4.csd.uwm.edu> <2576@l.cc.purdue.edu> <2581@l.cc.purdue.edu> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 29 In article <2581@l.cc.purdue.edu>, cik@l.cc.purdue.edu (Herman Rubin) writes: > Why is there an absolute value function rather than an absolute value > operator? In APL it's |x and in JOSS it's |x|. abs was an operator in Algol 68 too; how you entered it was of course system-dependent. > I have used a dialect of Fortran which overloaded some of the "standard" functions, > so that absolute value, logarithm, mod, etc., did not have to have any modifier > indicating the type(s) of the arguments. The compiler did the appropriate > analysis. Sounds like Fortran 77. PL/I "GENERIC" functions provided this. Algol 68 provided overloading for operators. Fortran 90 provides user-definable overloading. It's in Ada. Haskell overloads. > A language is a set of macros to be interpreted by the compiler into machine > procedures. There is no good reason why the user should not be allowed to > add macros in convenient notation to this list, nor why many of the restric- > tions on the current macros need be there. I strongly suspect that Pop-11 may have just what you want. (Except that for portability reasons it compiles to a common "Pop Virtual Machine".) I suggest that you look in comp.lang.lisp for articles posted by Aaron Sloman; he has recently pointed out that Pop-11 "syntax forms" let you plant the code of your choice. -- Heuer's Law: Any feature is a bug unless it can be turned off.