From: Walter Bright on
David Abrahams wrote:
> FORTH.
>
> And no, I'm not kidding.

Why aren't you programming in FORTH, then?

Emulating features from a niche language is not a good idea, especially
if those features are all-powerful, unless one thoroughly understands
why the language failed to become mainstream.

After all, D isn't named FIFTH. <g>

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

From: Andrei Alexandrescu (See Website For Email) on
Maciej Sobczak wrote:
> AJ wrote:
>
>>> No language manages to completely do away with undefined
>>> behavior. Although C++ could surely do better in this regard;
>>> there's a lot of unnecessary undefined behavior.
>>
>> I have doubts about that first assertion. Surely there are academic
>> languages out there that do. Moreover, I wasn't aware that fully-managed
>> (e.g. no unsafe/PInvoke), CLS-compliant C# contained any UB. Does it? I
>> also think pure ECMAScript is safe in that regard.
>
> If the language is absolutely free of any UB then you basically cannot
> implement its own library in it - with I/O being the crucial part.

(Still late in the thread.) Probably any I/O, memory allocation, system
access etc. etc. facility is ultimately provided by the system in some
procedural form. The issue of implementing the lowest-level primitives
within the language is not essential for the well being of the language.

> Of course, it is possible to define a language without UB and give it a
> library that is "reach enough", but such languages are not what we would
> call "system-programming languages" (try to find one).

I think Modula-3 was system-level PL and also safe.


Andrei

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

From: Gabriel Dos Reis on
Walter Bright <walter(a)digitalmars-nospamm.com> writes:

| Gabriel Dos Reis wrote:
| > | 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.
| >
| > As if I did not know.
|
| That's great. Now we can move on to a technical discussion of where you
| feel he's gone wrong in advocating a separate imaginary type.

I admire your effectiveness at eliding my original query.

# So, there must be something more to your arguments than you have
# said. It would very useful if you could articulate them for some of us
# that are ignorant in numerics, instead of invoking proof by authority.

I'm very much interested in your technical arguments, logically and
clearly articulated, which do not just consist of posting a link to a
document that blend a large amont of anti-Sun rants and other
material, or which do not just consist of proof by authority.

Let's recall that, my query comes after your claim:

# > But even if so, how does an Imaginary type help with that, when x+i*y
# > can always be represented as Complex(x,y) and vice versa?
#
# This explains it better than I can:
# http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf

I have provided material supporting that C++ complex library does
nothing wrong with respect to what the document claims. In particular

C++'s library has operators overloaded for mixed operands, so no
wasteful arithmetic. It is just as in:

[...]

James Gosling has proposed. Kahans imaginary class allows real and
complex to mix without forcing coercions of real to complex. Thus his
classes avoid a little wasteful arithmetic ( with zero
imaginary parts ) that compilers can have trouble optimizing
away. Other than that, with overloaded infix arithmetic operators, you
can't tell the difference between Kahans syntax and Goslings.

| > But, the 8087 floating point implementation does not meet unanimous
| > consensus -- and this not just from ignorant programmers.
|
| Objections to it I've seen are based on speed, not suitability to
| accurate numerical work. If you know of other serious objections, why
| not post them?

I'm very happy do so in a another message, just to separate that topic
from my original query because I feel like you refuse to address my
original technical question in favor of discussing authority.

--
Gabriel Dos Reis
gdr(a)integrable-solutions.net

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

From: Gabriel Dos Reis on
Walter Bright <walter(a)digitalmars-nospamm.com> writes:

[...]

| > Did you ever write a Forth vocabulary? I have and among other things
| > implemented Logo on a Forth system.
|
| I've never done anything with Forth. I know next to nothing about it.
|
| If Forth is so powerful, why has it remained an obscure niche language?

(1) Obscurity is the eye of beholder.

(2) I see your question is predicated on a proposition, e.g. "If
Forth is so powerful." I'm not sure "so powerful" guarantees 100%
mainstream adoption of a given programming language.

--
Gabriel Dos Reis
gdr(a)integrable-solutions.net

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

From: Nemanja Trifunovic on

Walter Bright wrote:
> 1) Extend std::string to support UTF-8.

Ehm: http://utfcpp.sourceforge.net/


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