Re: RPN maps to basic mathematic expressions nicely



kenney@xxxxxxxxxxxxxxxxxxx wrote:
Jack tossed the ball to Jill.

Nice and clear and unambiguous, however consider this one.
Time flies like an arrow.

You forgot the next line:

Time flies like an arrow,
fruit flies like a banana.

My claim isn't that one can't construct confusing sentences in English. In fact, if we couldn't write confusing sentences, we wouldn't have puns and poetry.

My claim is that for the vast majority of communication between people experienced with a language, understanding isn't something that requires conscious deconstruction of the sentences. You are reading these words right now without getting out paper and pencil and diagramming my words. It's automatic. You don't think about it.

The *same* applies to people experienced with programming languages. If you aren't that familiar with a language like C, this is pure gibberish:

while (char ch = *s++)
blah(ch);

For someone who isn't experienced with C, this isn't readable. They sit there and pick apart the expression, stepping through each element, puzzling through everything. But if you are experienced, this is readable (and idiomatic). You don't see the syntax. You just see the programmer's intent.

Personally while most of my programming has been in Basic and Pascal I still find Forth easier to read than C.

I'm not sure why that should be surprising. You've stated that most of your programming is in BASIC, Pascal, and Forth. Why would a language you apparently have less experience with (C) be easier to read? My claim is simple-- readability is more a measure of experience in a language than a property of the language itself.
.



Relevant Pages

  • Re: RPN maps to basic mathematic expressions nicely
    ... Time flies like an arrow. ... The problem isn't missing punctuation, it's missing context. ... My claim is that for the vast majority of communication between people experienced with a language, understanding isn't something that requires conscious deconstruction of the sentences. ...
    (comp.lang.forth)
  • Re: OverLoad Question
    ... OHM ... > Paul Vick's "The Visual Basic .NET Programming Language" from Addison ... >> Thanks for the tip Jay. ... >> Time flies when you don't know what you're doing ...
    (microsoft.public.dotnet.languages.vb)
  • Re: about maths: strictly speaking, off topic, but justified.
    ... As any programmer will tell you, a language doesn't need to have "verbs"; it can be an example of a Formal Language: ... Such things in turn form the foundation of languages that take mathematical language as a subset - Mathematica, Maple, Reduce, etc. ... "Time flies like an arrow". ...
    (sci.physics)