[comp.lang.c] Another \"D\" idea: RPN

TLIMONCE%DREW.BITNET@CUNYVM.CUNY.EDU (03/03/88)

I'm really excited about the idea of a "D" programming language. Let me
make a suggest or two:

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.

Another thing that "D" should have... actually not have, is pointers. At
least 85% of the problems discussed here on Info-C are people who have
some problem with confusion about pointers.  Removing pointers would solve
this whole set of problems.

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.  With such a simple definition like this,
nobody will get confused.

  Tom Limoncelli | Drew U/Box 1060/Madison NJ 07940 | tlimonce@drew.BITNET
      Disclaimer: These are my views, not my employer or Drew Univesity
  ------------------------------------------------------------------------

gwyn@brl-smoke.ARPA (Doug Gwyn ) (03/04/88)

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.

rcvie@tuvie (ELIN Forsch.z.) (03/04/88)

In article <12088@brl-adm.ARPA> TLIMONCE%DREW.BITNET@CUNYVM.CUNY.EDU writes:
>I'm really excited about the idea of a "D" programming language. Let me
>make a suggest or two:
> ... RPN ... [no] pointers ...

I hope you did not really mean that! Even HP had to change to an algebraic
input as people really disliked the polish input, stack handling, etc.
And pointers give the C programmer one of the most powerful means [s]he has
to develop efficient code. Who is not able to use pointers correctly should
better try BASIC or stay away from programming at all.

>  Tom Limoncelli | Drew U/Box 1060/Madison NJ 07940 | tlimonce@drew.BITNET
>      Disclaimer: These are my views, not my employer or Drew Univesity
Does your employer know them?

			Dietmar Weickert,
				ALCATEL-ELIN Research Center, Vienna, Austria.

gordan@maccs.UUCP (gordan) (03/05/88)

In article <12088@brl-adm.ARPA> TLIMONCE%DREW.BITNET@CUNYVM.CUNY.EDU writes:
-
-With such a simple definition like this, nobody will get confused.

I am (or someone else is, just like me but totally different).


-- 
Gordan Palameta                                "Ecrasez l'infame"
...mnetor!lsuc!maccs!gordan                              -- Voltaire

donn@utah-cs.UUCP (Donn Seeley) (03/06/88)

Congratulations -- this was the funniest article I've read in weeks!

Actually, this whole 'D' discussion is the best example of how not to
do language design (or indeed any other kind of design) that I've ever
seen.  That's not to say I object to any particular language concept
that has been brought up -- although a C-like language with RPN syntax
is stretching it -- but this 'design' process is uninformed, undirected
and mostly unintelligible.  State your programming methodology first;
then justify your inclusion or exclusion of programming language
features based on how they interact with your methodology.  I hope
that anyone who submitted a programming language paper that exhibited
the same 'design principles' as 'D' would get a D for it, if not an F.

Of course, these 'D' proponents have been working from ANSI C's example,

Donn Seeley    University of Utah CS Dept    donn@cs.utah.edu
40 46' 6"N 111 50' 34"W    (801) 581-5668    utah-cs!donn

PS -- Can we move the 'D' discussion to comp.lang.misc?  Or at least
move the articles that aren't funny?
PPS -- Naturally, this brings up the issue of what should go into the
language 'F'...

gregory@ritcsh.UUCP (Gregory Conway) (03/07/88)

In article <12088@brl-adm.ARPA>, TLIMONCE%DREW.BITNET@CUNYVM.CUNY.EDU writes:
> 
> Another thing that "D" should have... actually not have, is pointers. At
> least 85% of the problems discussed here on Info-C are people who have
> some problem with confusion about pointers.  Removing pointers would solve
> this whole set of problems.
> 

     You seem to me to be a little hasty here.  The problem has NOTHING to do
with pointers, but rather people who do not understand pointers who use them
anyways.  Pointers are the most powerful aspect of the C programming language
and are what make it such a joy to work with.  To para-phrase, pointers
don't kill, programmers do.


-- 
================================================================================
Gregory Conway@Computer Science House    UUCP: ...rochester!ritcv!ritcsh!gregory
Rochester Institute of Technology, Rochester, NY
    "I got an allergy to Perrier, daylight, and responsibility", Marillion

frank@zen.UUCP (Frank Wales) (03/08/88)

In article <580@tuvie> rcvie@tuvie.UUCP (Dietmar Weickert) writes:
>In article <12088@brl-adm.ARPA> TLIMONCE%DREW.BITNET@CUNYVM.CUNY.EDU writes:
>>I'm really excited about the idea of a "D" programming language. Let me
>>make a suggest or two:
>> ... RPN ... [no] pointers ...
>I hope you did not really mean that! Even HP had to change to an algebraic
>input as people really disliked the polish input, stack handling, etc.

Not quite.  Only those HP calculators with business functions 
use algebraic logic now (this includes the 27S, which is a hybrid
scientific/business calculator).

HP's pure scientifics continue to use RPN, because it is the only 
consistent logic system for calculators.  This tells us something
about the scientific and business marketplaces, not the relative
merits of RPN vs algebraic logic.

Having said *that*, I would not like to see postfix notation used for
a descendant of C, because to make it fit into the language right
would involve recasting the rest of the syntax along the lines of
FORTH, and that would be a bad move.


--
Frank Wales, Development Engineer,    [frank@zen.uucp<->mcvax!zen.co.uk!frank]
Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048 x220 

justin@inmet.UUCP (03/09/88)

/* Written  4:29 pm  Mar  3, 1988 by gwyn@brl-smoke.UUCP in inmet:comp.lang.c */
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.
/* End of text from inmet:comp.lang.c */

God, it's finally happened. I had heard about this trend, but I couldn't 
believe it. But it's really true. Nobody on the net (except in talk.bizarre)
is capable of recognizing sarcasm without a row of smileys at the end!

Come on, people, *think* about what you're reading. If we really have lost
the ability to tell what tone the article was written in, it means that
English on the net has degenerated a lot more than I thought.

					-- Justin du Coeur

gwyn@brl-smoke.ARPA (Doug Gwyn ) (03/11/88)

In article <124200005@inmet> justin@inmet.UUCP writes:
>/* Written  4:29 pm  Mar  3, 1988 by gwyn@brl-smoke.UUCP in inmet:comp.lang.c */
>In article <12088@brl-adm.ARPA> TLIMONCE%DREW.BITNET@CUNYVM.CUNY.EDU writes:
[...]
>God, it's finally happened. I had heard about this trend, but I couldn't 
>believe it. But it's really true. Nobody on the net (except in talk.bizarre)
>is capable of recognizing sarcasm without a row of smileys at the end!

Actually, the two of us conspired in advance to post this dialogue.
But I did mean what I said in my response, unlike the originator
who was indeed just poking fun at the "D language" discussion.