Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Another \"D\" idea: RPN (and more) Message-ID: <7408@brl-smoke.ARPA> Date: 3 Mar 88 21:29:55 GMT References: <12088@brl-adm.ARPA> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 25 In article <12088@brl-adm.ARPA> TLIMONCE%DREW.BITNET@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.