From: | Taylor Hutt <t.hutt@worldnet.att.net> |
Newsgroups: | comp.compilers |
Date: | 12 Jul 1999 01:06:00 -0400 |
Organization: | Logic Magicians |
References: | 99-07-023 99-07-038 99-07-042 |
Keywords: | syntax |
David Chase wrote:
> Think how much simpler life would be if we could ditch those
> fragdabbling prefix operators and use postfix notation for casts,
> for example:
>
> x[i].clone().(Vector).get(3)
>
> instead of
>
> ((Vector)(x[i].clone())).get(3)
>
> [There's no reason that assemblers have to have awful syntax. About
> 30 years ago I used Niklaus Wirth's PL360, which was basically a S/360
Not surprisingly then, Wirth's final langauge: Oberon does have
postfix casting (type guards).
b : Base; (* pointer to a record; assume Ext is an extension type *)
b(Ext).field := some value.
Interprets the pointer 'b' as an 'Ext' and accesses 'field' in the Ext
record structure. If 'b' is not an 'Ext' at runtime, the program is
halted with an appropriate error.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.