Related articles |
---|
Designing a language in which a class can define (not just overload) news@chunk.com.au (Richard Cartwright) (2003-08-20) |
Re: Designing a language in which a class can define (not just overloa joshualevy@yahoo.com (2003-08-23) |
Re: Designing a language in which a class can define (not just overl toon@moene.indiv.nluug.nl (Toon Moene) (2003-09-04) |
From: | Toon Moene <toon@moene.indiv.nluug.nl> |
Newsgroups: | comp.compilers |
Date: | 4 Sep 2003 22:37:31 -0400 |
Organization: | Moene Computational Physics, Maartensdijk, The Netherlands |
References: | 03-08-062 03-08-082 |
Keywords: | design, syntax |
Posted-Date: | 04 Sep 2003 22:37:30 EDT |
Joshua Levy wrote:
> "Richard Cartwright" <news@chunk.com.au> wrote
>
>>I have OO language design in my head in which it is possible for a
>>class to define new operators.
Duh - why do you need OO to define new operators ?
> I have a dim memory of a paper published in CACM in the 1984-1987 time
> frame, which solved this problem by forcing new infix operators to
> start and end with dots, while new prefix operators would end with a
> dot and postfix operators would start with a dot.
>
> In your example "cross" and "dot" would actually be .cross. and .dot.,
> like this:
> c = a .cross. b;
> f = a .dot. b;
You probably remember a discussion about Fortran 8x. In the time
frame you mention it was far enough advanced to allow this.
Infighting in the Standardization committee held this Standard up till
'91, when the Fortrna 90 Standard was published. All contemporary
Fortran compilers allow the syntax (and semantics) in the example you
show.
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)
Return to the
comp.compilers page.
Search the
comp.compilers archives again.