From: David Abrahams on
Walter Bright <walter(a)digitalmars-nospamm.com> writes:

> Ok, show me a language that is so user extensible so that, say, I can
> construct a library so powerful that it can exactly emulate other
> computer languages. In other words, where is language X that can accept
> C++, Pascal, C#, Lisp, etc., source code just be adding on a powerful
> library?

FORTH

> Steadily improving support for libraries hardly constitutes making
> libraries as powerful as the compiler. That's like saying if I climb
> a mountain, I'm making progress towards the moon.

Yeah, but computer languages don't really exploit all the the syntax
variability of those different languages. For example, pascal-style
comments vs. C++-style comments doesn't make any significant
difference in the expressive power of the two languages, so it isn't
important to be able to exactly emulate all of those languages.

What's important is to be able to write sufficiently expressive APIs,
for some definition of "sufficiently expressive." I don't believe C++
or D has been built with enough flexibility to allow what I consider
"sufficient."

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: David Abrahams on
Walter Bright <walter(a)digitalmars-nospamm.com> writes:

> Ok, show me a language that is so user extensible so that, say, I can
> construct a library so powerful that it can exactly emulate other
> computer languages. In other words, where is language X that can accept
> C++, Pascal, C#, Lisp, etc., source code just be adding on a powerful
> library?

FORTH. Just don't ask me to write any of those libraries! :)

> Steadily improving support for libraries hardly constitutes making
> libraries as powerful as the compiler. That's like saying if I climb
> a mountain, I'm making progress towards the moon.

Yeah, but computer languages don't really exploit all the the syntax
variability of those different languages. For example, pascal-style
comments vs. C++-style comments doesn't make any significant
difference in the expressive power of the two languages, so it isn't
important to be able to exactly emulate all of those languages.

What's important is to be able to write sufficiently expressive
library APIs, for some definition of "sufficiently expressive." I
don't believe C++ or D has been built with enough flexibility to allow
what I consider "sufficient."

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Walter Bright on
Gabriel Dos Reis wrote:
> So, there must be something more to your arguments than you have
> said.

See my reply to Alf P. Steinbach dated 11/22/2006 2:29 PM in this thread.

BTW, Prof. Kahan is the person behind the design of the 8087 floating
point CPU chip, as well as the IEEE 754 floating point specification. If
there is any authority on computer floating point, it'd be him. Although
argument by authority is a logical fallacy, I'd do my homework before
disagreeing with him on floating point issues.

http://www.dr-chuck.com/dr-chuck/papers/columns/r3114.pdf



--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Walter Bright on
Bo Persson wrote:
>>> I am very happy when I can implement, or extend, some feature
>>> without specific compiler support.
>> There's no way you're going to get std::string, std::vector or
>> std::complex to work as well as core support for such with existing
>> C++ core features.
> In that case I would very much prefer if we could add the necessary core
> features, rather than add the types to the core language. (I have noticed
> that you have done some of that in D, but not enough obviously).

Doing so would require:

1) adding user defined tokens
2) adding user defined syntax

While technically possible, I suspect that such a language would be
unusable in practice. It'd be like trying to shave holding a razor blade
in your hands. An infinitely customizable language would have no
touchstone, no point of commonality between one user's code and another's.

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Francis Glassborow on
In article <ddydnXqDgMDef_jYnZ2dnUVZ_tidnZ2d(a)comcast.com>, Walter Bright
<walter(a)digitalmars-nospamm.com> writes
>Doing so would require:
>
>1) adding user defined tokens
>2) adding user defined syntax

Did you ever write a Forth vocabulary? I have and among other things
implemented Logo on a Forth system.


--
Francis Glassborow ACCU
Author of 'You Can Do It!' and "You Can Program in C++"
see http://www.spellen.org/youcandoit
For project ideas and contributions:
http://www.spellen.org/youcandoit/projects


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]