<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
>


|