From: Walter Bright on 24 Nov 2006 04:23 Andrei Alexandrescu (See Website For Email) wrote: > Arguing that these languages weren't as successful > as more rigid languages is not very convincing because languages of all > ilk succeed or fail for a variety of imponderable reasons. One of my hobbies is history. I'm not interested in dates or events in particular, I'm interested in why things have turned out the way they did. Why are some generals, for example, more successful than others? Is it luck? Is it because they're smarter? Is it because of their culture? Etc. Can we learn from history, or are we just doomed to repeat it? It's the same with computer languages. Some succeed, a lot fail. They fail for all sorts of reasons, certainly not always technical. If I can learn why they fail, perhaps I can avoid their mistake. If I can learn why some succeed, I hope I can learn from that, too. It may be imponderable, but I'm not ready to throw in the towel on it. If a language is a failure, before adopting its features, I would need some convincing that those features are not the reason it failed. If a language is a big success, odds are pretty good that the technical decisions behind it are sound, too. I am certainly not always right about the utility of various features, but if you examine D carefully, it is comprised of features that there is good reason to believe were drivers of success in other languages. Certainly, the bulk of C++ is in D, and that's sincere flattery. D has adopted C++'s powerful methods of creating libraries. But D isn't just a copy of other languages - you've contributed a number of innovative ideas to it, too, such as scope guard. For another imponderable, why do reusable Java libraries sprout everywhere you look, but reusable C++ libraries seem to follow a more tortured path? Is there something about C++ that makes it difficult to write libraries? And why do users often write their apps in Python, and use C++ just for the bottlenecks? Is there a way I can combine the productivity of Python and Ruby with the performance of C++ with Java's ease of library creation? I like to think there is, and I want to find that sweet spot. -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
From: David Abrahams on 24 Nov 2006 04:19 { I'm approving this because I'm in doubt about whether it's on-topic or not, and when in doubt... There is a tenuous connection back through D and a comparision between D and C++, and what should be core language features or implemented as library solutions. However, for follow-ups, please get back onto topics more clearly C++-related. -mod/aps } Walter Bright <walter(a)digitalmars-nospamm.com> writes: > David Abrahams wrote: >> FORTH. >> >> And no, I'm not kidding. > > Why aren't you programming in FORTH, then? All kindsa reasons. > Emulating features from a niche language is not a good idea, It's not just a feature, really -- it goes all the way down to the core of the language. > especially if those features are all-powerful, unless one thoroughly > understands why the language failed to become mainstream. I know at least some of the reasons why. Are you saying that you don't thoroughly understand why it failed to become mainstream? -- 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 24 Nov 2006 04:22 Gabriel Dos Reis wrote: > I'm very much interested in your technical arguments, logically and > clearly articulated, Then feel free to respond to my post to Alf P. Steinback, 11/22/2006 2:29 PM. -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
From: David Abrahams on 24 Nov 2006 04:21 Walter Bright <walter(a)digitalmars-nospamm.com> writes: > David Abrahams wrote: >> 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 > > Has anyone proven this by writing a FORTH library that can accept C++ > source code? Pascal code? C# code? Lisp code? Of course not. >> 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." > > As I suggested to Bo Persson, such a "mother of all languages" may not > be that usable. Scala looks pretty interesting. Did you have a look at it? > After all, why aren't you using FORTH? Because it's not a "mother of all languages." You might consider it an evolutionary great-great-great-....-great grandmother of the mother of all languages, if such a thing even exists. It may be theoretically possible to do, but FORTH wasn't really designed to be good at allowing people to do that sort of embedded language construction with sufficient flexibility. Also, one thing you need in order to write good languages is a reasonably expressive language to do it in. FORTH ain't, in my opinion, very expressive in and of itself. And RPN eventually makes my head hurt :) -- 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 24 Nov 2006 04:20
Walter Bright <walter(a)digitalmars-nospamm.com> writes: > David Abrahams wrote: >> Walter Bright <walter(a)digitalmars-nospamm.com> writes: >>> I argued that: >>> >>> 1) library features are not part of the core language. >>> >>> 2) C++ (and D) do not have good enough core features to be able to >>> create a library string (and vector, complex and associative arrays) >>> that are good enough to compete with core support for such. >> >> That, I buy. However... >> >>> 3) String, complex, vector and associative arrays are ubiquitous enough >>> that the extra goodies one can get with a core feature make them >>> worthwhile to put in the core language. >> >> ....what does "put it in the core language" really mean? If you look >> at Python, for example, the only part of string, list, and dict that >> is truly and irremedially "in the core language" is the syntax for >> literals. The rest could, in principle, be written in Python. Of >> course, you'd need strings, lists, and dicts of some kind to do that, >> but then Python doesn't have the low-level facilities of a systems >> programming language, which would allow us to write those parts. D >> doesn't have that limitation. > > I think you answered your question <g>. So your only reason for having these things in the D core language is the literal syntax? Are you telling me you can't find a way to generalize the literal syntax a bit so we could have the same kinds of benefit for UDTs? > The only thing I can think of to add is that Python may need to put > such basic things it its core language for performance reasons. Sure, sure, but the fact that Python is interpreted is really unimportant to this discussion. > A constant theme I hear from heavy Python programmers is they have to > be adept at C because they have to write bits and pieces of their app > in C and hook them into the Python engine, because doing it in 100% > Python is too slow. Hmm, http://www.boost.org/libs/python ? -- 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! ] |