Another \"D\" idea: RPN (and more)

Doug Gwyn gwyn at brl-smoke.ARPA
Fri Mar 4 07:29:55 AEST 1988


In article <12088 at brl-adm.ARPA> TLIMONCE%DREW.BITNET at CUNYVM.CUNY.EDU writes:
>I think that the one thing that really detracts from C is the fact that it
>isn't RPN.  Reverse-polish-notation has a lot of benefits.  First of all,
>we'd get the support of all the HP calculator lovers, all the FORTH users,
>and compiler writers would find it easier to write compilers since RPN is
>easier to parse.

This idea isn't totally off-the-wall, but it would move the D language
away from being a revised C and toward something markedly different.

I think "reverse" should be dropped, i.e. the operators should precede
the operands.  (ordinary Polish notation)

Lisp is essentially based on Polish notation.  One of my all-time favorite
programming languages, TRAC, used Polish notation.  When I work with logic
notation, for example in the reduction of intermediate terms in the DES, I
normally use Polish notation, which is more amenable to symbolic manipulation
than infix notation.

>Instead of pointers, we should have dynamic links.  These would be just
>like pointers but totally different.  Dynamic links will hold the address
>of what they are pointing to.

The only interpretation I could come up with for this was that pointers
should be typeless.  Actually, in Algol-like languages that is what
pointers were like, so it's not an entirely new idea.



More information about the Comp.lang.c mailing list