Re: parser

On 14 Sep, 13:06, "cr88192" <cr88...@xxxxxxxxxxxxxxxxxx> wrote:
"Jon Harrop" <j...@xxxxxxxxxxxxxxxxx> wrote in message
Compilers need a lot more than strings.

yes, and most of this stuff is not difficult to implement.

one can "imagine" it being painful, but in practice it is rarely much of an

A lot of people buy our products because they do not find parsing to
be as easy as you believe it is.

LISP/SML/ML and Wirth languages are all better at describing the
features needed in a compiler.

and each contain many disadvantages as well "in general"...

Such as?

primarily that they don't intergrate well with existing codebases,

Can you give a specific example where those languages do not
"integrate well with existing codebases"?

and in
turn most non-C/C++ languages don't integrate well with the OS and
common system libraries.

Can you give any specific examples where Lisp or MLs fail to
"integrate well with the OS and common system libraries"?

meanwhile, if the JVM or .NET is being used, then it makes most sense to use
Java and C#,

Why do you believe "it makes most sense to use .. C#" when the sole
purpose of the Common Language Run-time is to make interoperability
between languages trivial and facilitate the use of other languages?

there is also code-migration cost (moving pieces of code from project A to
project B, ...), maintainence costs, ... which each strongly favor common

We have found ML code (OCaml and F#) to be around 10x cheaper to
maintain than C++ code. Many other companies have come to the same
conclusion and, indeed, this is precisely why Microsoft are
productizing F#.

and where the amount of code being copied and tweaked is
typically far larger than the amount being written clean in most projects.

now, if we take into account the masses of people working on masses of
projects, we can also note that most existing codebases exist in common
languages, and most programmers work with common languages. so, code is of
the most utility if it, as well, is in a common language.

That is a circular argument followed by a non-sequitur.

so, the 'cost of use' is much higher for less common languages than more
common ones

for example, consider a person knows multiple languages, and intends to
write a book. they could use, for example, english, or they could also use
classical greek.

now, consider they intend to focus on a wide market, which are they likely
to choose:
if they write it in english, many people in many places in the world will
likely buy it (thus making them a lot more money);
if they use classical greek, few if any people will buy it (thus making them
little money, or them actually losing a lot of money).

My book OCaml for Scientists is an obvious counter example, having
already made 5x more profit than the average book about a mainstream
programming language despite being about a non-mainstream language

sometimes, it is a lot more useful to just cruft whatever is needed on
of C or C++, than to use a theoretically "better" language, but face the
costs (such as poor integration with the existing codebase, limited tools
selection, incompatibilities between the languages, ...).

Note that all of those languages have more higher quality libraries and
tools available than C++. Indeed, they all provide more relevant
functionality in their standard library.

but, they also cost in that they don't interface well with "the bulk" of
existing code and codebases,

I'd like to see some examples.

and with "the bulk" of existing programmers,

Good programmers already know these languages.

are unlikely to get much industrial attention, ...

The productization of F# by Microsoft is an obvious counter example.

newbie programmers would actually have to go through some effort to go and
copy/paste bits from other projects if they work in an uncommon language,

Why would that be any more difficult in an uncommon language? Indeed,
I would say that it is vastly easier because the quality of code in
those languages is generally much higher than in C++.

and are also unable to contribute to most existing projects if they insist
on said language,

That is true of all languages.

are far less likely to get a job, ...

Knowing more languages makes you more employable.

for practically useful code, all these are much bigger issues...

A lot of practically useful code is written in those languages.