Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Languages Misc > Re: RPN maps to...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 30 of 55 Topic 1073 of 1203
Post > Topic >>

Re: RPN maps to basic mathematic expressions nicely

by "cr88192" <cr88192@[EMAIL PROTECTED] > Nov 21, 2007 at 07:13 AM

"Jerry Avins" <jya@[EMAIL PROTECTED]
> wrote in message 
news:0qadnRaZILrcj97anZ2dnUVZ_rOqnZ2d@[EMAIL PROTECTED]
> cr88192 wrote:
>> "Jerry Avins" <jya@[EMAIL PROTECTED]
> wrote in message 
>> news:XLGdnQv36Ipbid_anZ2dnUVZ_jqdnZ2d@[EMAIL PROTECTED]
>>> cr88192 wrote:
>
>   ...
>
>> but, what I am talking about is not what is "natural", but "generally 
>> superior".
>
> I must have misread you. By what criterion is infix "generally superior"

> to RPN?
>
>   ...
>

one reason:
spatial associativity (operators are often between what they relate to);
tradition (people have long since used such conventions);
abstraction (the syntax is not necessarily tied to the underlying 
machinery);
....


>> so, the question is not, which is more natural, but which is better...
>
> Please define "better". Better for what?
>

better for humans.

machine cost can be ignored, as can parser/complier complexity (usally
only 
much worry to compiler writers);
....

so, the question is, what "looks" best, and what form requires the minimal

level of mental involvement to process.

for example, if one can just quickly scroll the code past and know about
how 
it works, that is good.
if one actually has to 'read' the code (aka: a good solid look, not just a

quick glance before they next press 'page down'), that is not so good.

for example, a good deal of readability is contained in the use of braces 
and indentation.
if the braces or intendation are not right, or spaces are used or not used

in some unusual way, then code readability is greatly reduced, and one has

to actually read the code.

but, at least, the uses of braces and indentation as the major cues is 
possible.


>> think conservatively...
>>
>> if for no other reason than this, this is how things are.
>>
>> is the 8 bit byte any more "natural" than a 12 bit one?...
>> yet, if someone suggests that the entire industry goes over to 12 bit 
>> bytes, we regard the person as uninformed...
>
> The C compiler for one embedded processor I use has 16-bit bytes. The 
> compiler for another uses 32-bit bytes. With it, sizeof(long) is 1.
>

true, but note that, in general, compilers for such archs often 'fake' the

good old 8 bit bytes.
if these bytes are not maintained, our fileformats break, and everything
is 
thrown into chaos...


>> if one understands conservativism, and gradual refinement, one may well

>> understand syntax...
>
> Interesting. Would you mind expanding on the link between syntax and 
> gradual refinement? You might think of RPN as a refinement of infix that

> avoids ambiguity. Infix requires disambiguation rules; RPN does not. In 
> some infix languages, 2+3*4 is 20, in others, 24. Is that "better"?
>

well, infix also carries the assumption of precedence ordering.
now, it can be noted that right and left associative languages are nearly 
universally rejected.

as such, any valid infix language would follow good old PEMDAS, in one
form 
or another.
most C family languages follow the C style precedence ordering, even
though 
IMO, a slight reorganization would make sense (bitwise operators being put

at at least similar precedence to arithmetic operators, ...).

but, no, I say, modern C style syntax is the refinement of K&R style C 
syntax, which is a refinement of B, which is a refinement of BCPL, ...

look at FORTRAN or ALGOL code, and it is just ugly.
FORTRAN, with its ad-hoc structure and brittleness;
ALGOL, with all its words (we need structure, not words, structure for 
syntax and words or letters for variables and objects...).

look at newer langs, like C#, and the syntax is much cleaner than, say, 
C++...


> Jerry
> -- 
> Engineering is the art of making what you want from things you can get.
> ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
 




 55 Posts in Topic:
RPN maps to basic mathematic expressions nicely
"metaperl.com"   2007-11-11 12:50:24 
Re: RPN maps to basic mathematic expressions nicely
"Paul E. Bennett&quo  2007-11-11 13:06:24 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-12 09:25:56 
Re: RPN maps to basic mathematic expressions nicely
Marco van de Voort <ma  2007-11-12 09:21:48 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-12 21:40:58 
Re: RPN maps to basic mathematic expressions nicely
Marco van de Voort <ma  2007-11-12 11:46:48 
Re: RPN maps to basic mathematic expressions nicely
Jerry Avins <jya@[EMAI  2007-11-12 13:51:05 
Re: RPN maps to basic mathematic expressions nicely
Andrew Haley <andrew29  2007-11-12 11:39:14 
Re: RPN maps to basic mathematic expressions nicely
Jerry Avins <jya@[EMAI  2007-11-12 13:54:50 
Re: RPN maps to basic mathematic expressions nicely
stephenXXX@[EMAIL PROTECT  2007-11-16 17:49:33 
Re: RPN maps to basic mathematic expressions nicely
Andrew Haley <andrew29  2007-11-16 18:26:39 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-17 19:22:07 
Re: RPN maps to basic mathematic expressions nicely
mhx@[EMAIL PROTECTED] (M  2007-11-17 12:34:02 
Re: RPN maps to basic mathematic expressions nicely
Albert van der Horst <  2007-11-17 16:01:42 
Re: RPN maps to basic mathematic expressions nicely
Jerry Avins <jya@[EMAI  2007-11-17 13:37:04 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-18 08:39:07 
Re: RPN maps to basic mathematic expressions nicely
Richard Owlett <rowlet  2007-11-17 17:16:33 
Re: RPN maps to basic mathematic expressions nicely
mhx@[EMAIL PROTECTED] (M  2007-11-18 00:21:13 
Re: RPN maps to basic mathematic expressions nicely
mhx@[EMAIL PROTECTED] (M  2007-11-18 00:54:13 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-18 11:17:04 
Re: RPN maps to basic mathematic expressions nicely
Andrew Haley <andrew29  2007-11-18 17:50:04 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-19 07:48:22 
Re: RPN maps to basic mathematic expressions nicely
Andrew Haley <andrew29  2007-11-19 10:03:11 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-20 06:22:12 
Re: RPN maps to basic mathematic expressions nicely
Jerry Avins <jya@[EMAI  2007-11-19 15:39:14 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-20 08:33:48 
Re: RPN maps to basic mathematic expressions nicely
Jerry Avins <jya@[EMAI  2007-11-19 17:57:09 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-20 16:56:28 
Re: RPN maps to basic mathematic expressions nicely
Jerry Avins <jya@[EMAI  2007-11-20 11:58:40 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-21 07:13:13 
Re: RPN maps to basic mathematic expressions nicely
Jerry Avins <jya@[EMAI  2007-11-20 17:55:00 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-21 12:03:34 
Re: RPN maps to basic mathematic expressions nicely
Jerry Avins <jya@[EMAI  2007-11-20 21:34:26 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-21 14:24:44 
Re: RPN maps to basic mathematic expressions nicely
Elizabeth D Rather <er  2007-11-17 15:30:04 
Re: RPN maps to basic mathematic expressions nicely
anton@[EMAIL PROTECTED]   2007-11-18 09:48:12 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-21 09:43:55 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-22 13:52:20 
Re: RPN maps to basic mathematic expressions nicely
Elizabeth D Rather <er  2007-11-21 22:48:50 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-24 12:00:16 
Re: RPN maps to basic mathematic expressions nicely
stephenXXX@[EMAIL PROTECT  2007-11-24 14:31:22 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-25 08:20:06 
Re: RPN maps to basic mathematic expressions nicely
stephenXXX@[EMAIL PROTECT  2007-11-24 14:31:22 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-25 08:20:06 
Re: RPN maps to basic mathematic expressions nicely
"slava@[EMAIL PROTEC  2007-11-11 16:14:02 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-12 11:21:04 
Re: RPN maps to basic mathematic expressions nicely
Bernd Paysan <bernd.pa  2007-11-23 11:10:48 
Re: RPN maps to basic mathematic expressions nicely
Andrew Haley <andrew29  2007-11-23 15:49:07 
Re: RPN maps to basic mathematic expressions nicely
Bernd Paysan <bernd.pa  2007-11-23 17:24:16 
Re: RPN maps to basic mathematic expressions nicely
"Rod Pemberton"  2007-11-12 01:16:25 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-12 16:44:53 
Re: RPN maps to basic mathematic expressions nicely
Marco van de Voort <ma  2007-11-12 17:15:35 
Re: RPN maps to basic mathematic expressions nicely
Jerry Avins <jya@[EMAI  2007-11-12 14:17:04 
Re: RPN maps to basic mathematic expressions nicely
Gary Coulbourne <bear@  2007-11-19 11:22:53 
Re: RPN maps to basic mathematic expressions nicely
John Doty <jpd@[EMAIL   2007-11-19 15:11:44 
Re: RPN maps to basic mathematic expressions nicely
"cr88192" <c  2007-11-20 16:59:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 19 23:58:25 CDT 2008.