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 46 of 55 Topic 1073 of 1203
Post > Topic >>

Re: RPN maps to basic mathematic expressions nicely

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

<slava@[EMAIL PROTECTED]
> wrote in message 
news:1194826442.598377.149430@[EMAIL PROTECTED]
> On Nov 11, 6:25 pm, "cr88192" <cr88...@[EMAIL PROTECTED]
> wrote:
>> so, the downfall of forth is not that it is 'unnatural', but rather
that 
>> no
>> one can really read and follow the code...
>> one has to 'study', even their own code in a language they may know
well,
>> just to figure out what the hell they were doing.
>
> I've never had this problem in Factor, with my or other people's code.
>

I have not used Factor, but I have used Forth and PostScript...

(PostScript has been a far greater influence on me WRT this style though).


> Sure, sometimes the intent is not fully clear (perhaps due to poor
> choice of parameter names or data types) but that's nothing that some
> refactoring and clean up cannot fix.
>

the difficulty is not so much when there are poor names, but when there
are 
no names...

m***** of pop, dup, exch, ... interspersed with other operations can make 
code very difficult to follow apart from looking and mentally managing a 
representation of the stack.

however, I will not disparage the technical merits of such a language (I 
actually heavily use a language very much like this, albeit as an 
intermediate language for my C compiler...).


> Forth code can be a bit more opaque due to low-level memory management
> details, but usually this can be factored out into a nice vocabulary.
>
> The beauty of a flexible syntax and extensible semantics is precisely
> that well-written code can express intent well. The closer the code is
> to the problem domain, the easier it is to read. That's all there is
> to it.
>

I say, the problem is not nearly so simple...


>> this is not so much a problem with a more C-style syntax...
>
> So C and Forth syntax are diametrically opposed, and they represent
> the totality of possible language syntax? Personally I've had more
> trouble decoding people's code in "C-style" languages, because these
> languages tend to be so rigid and low-level that the intent of the
> code is lost! For example, manual memory management and pointer
> arithmetic (C) or layers and layers of indirection through objects
> (Java) or just incredibly obtuse and fragile syntax (C++).
>

it is a difference in opinion.

usually, one somewhat internalizes the syntax, and so they are not so much

operating at the level of the workings of the language (as is the case
with 
languages like Forth), but more on the general appearance of the language.

the syntax can become, in effect, an abstraction over the problem domain, 
greatly simplifying the operational working-set needed for understanding a

piece of code.

so, while RPN style syntax very clearly can represent the mechanics of 
something, C-style syntax can far more clearly represent the appearance of

something (the actual machinery hidden under many layers of abstraction).


so, one person will see a world of variables and opaque interfaces.
another will see a world of stack mechanics...


>> and one of the few cases where it did work in the long term, it has 
>> become
>> one of the most complicated and difficult to learn writing systems in
the
>> world...
>
> Are you suggesting that Chinese and Japanese really are complicated
> and difficult to learn? Billions of Asian people would disagree. They
> probably find English pronunciation rules difficult, though.
>

Japanese is not so difficult to learn spoken, and neither Katakana or 
Hiragana is all that problematic (more characters than in western
alphabets, 
but still within reason).

now, Kanji is a different matter, and even then, many people in Japan have

an arguably poor grasp on Kanji (mostly, the educated know it well, and
the 
uneducated know enough...).

as a result, Kanji is mostly used for 'traditional' things, wheras
Hiragana 
comprises much of the writing (Katakana being used for some things, such
as 
traditionally for im****ted words). technically, the Latin alphabet is
having 
influence as well, in the form of Romanji...

Japanese written in Romanji should be, arguably, not all that difficult to

learn as far as languages go (errm, partly ignoring verb endings and 
similar, but these can arguably be learned more by contex/rote than by
fully 
understanding them, ...).


spoken Chinese, well, this is a little harder than Japanese (major
problems: 
tones, large levels of variation, and very ambiguous word semantics).

as for writing, note that even for the Chinese culture's very high
emphasis 
on education, illiteracy is still a major problem in that country (in the 
US, it is assumed that almost everyone can read, and there, it is not too 
far from the reverse).

English is difficult to pronounce, and our spelling rules and grammar 
arguably suck hard, but at least the alphabet is easy...

technically, afaik, English is one of the hardest languages to learn (in 
general), but the Chinese writing system is the hardest writing system to 
learn...


take note of Vietnam, which dropped the Chinese writing system in favor of

the Latin alphabet (nevermind the bizarre accents...).

in this respect at least they are probably a little better off than their 
Chinese friends...

however, China has another big problem (limiting full-on applicability of 
the latin writing system, aka, pinyin), which is that it has too many 
"dialects", which would in effect make a phonetically-based writing system

almost useless (pretty much everyone would have to learn a common spoken 
language, for example, Mandarin, before a phonetic system would be all
that 
terribly useful).

or such...


> Slava
>
 




 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 Fri Jul 18 23:04:17 CDT 2008.