Fully transitive const is not necessary
Tim Burrell
tim at timburrell.net
Tue Apr 1 11:42:21 PDT 2008
Sean Kelly wrote:
> You know, I'm a huge fan of D, but now we have const, invariant,
> and pure, all ostensibly for making it possible for D to act more
> like a functional language when functional languages don't need
> all this mess to be parallelizable. Perhaps it's because of the C++
> 0x post from yesterday, but the above is beginning to give me
> flashbacks to C++ in that I'm starting to feel like D is trying to
> be the universal solution to all problems, and thereby not an
> ideal solution for any problem at all. One thing D has really had
> going for it thus far is conceptual and semantic simplicity, but
> I'm starting the feel that the const features are causing that
> simplicity to be lost.
Agreed!
> I can truly appreciate the desire to have D scale effectively
> as programming becomes more concurrent. At the same
> time, I am beginning to worry that the struggle to achieve
> this will end up destroying D's primary selling point (in my
> view)--its simplicity. I know this is all new ground for an
> imperative language so there's nothing to do but wait and
> see... I just wanted to get this out so I could move on with
> my day :-) Here's to hoping that D doesn't follow in the
> way of C++.
If D did move the way of C++ it would be a lot better off than it is
now. But, that being said, I agree with you... there's such a huge
opportunity here! Instead of going the way C++ did, or the way D is
going now (which is even worse), why not take the time to find a really
good, simple and effective solution?
For large parallel projects, I have seen some successful uses of Erlang,
but most of the parallel development these days is done in Fortran and
C++ because of OpenMP (even some big distributed apps are moving to
OpenMP via Intel's clustering OpenMP compiler). C++ also has a nice
join calculus module available in Boost, not to mention Boost's [new]
MPI support.
People aren't using C++ and Fortan because they're the best suited
languages... and parallel people are always looking for something better
because, like you said, in theory there should be a lot better choices
available to us. Functional languages promise neat and tidy
parallelization with no side affects, etc, but in reality they're too
slow and don't produce optimized code on the machines that parallel
developers need to write code for.
What we want is a fast, system level language, that can be targeted by
an optimizing compiler, but that is also quick and enjoyable to write
code in.
If D did have some support for parallel programming I think it would be
a major selling point, and I don't think it would need to complicate the
language at all. The whole problem here isn't that adding parallel
support automatically makes a language ridiculously complex.
The real issue is Walter's wacky and complex const system. Somehow he
thinks it's going to help with parallel development, so the issues are
getting mixed, but in reality they're completely unrelated.
More information about the Digitalmars-d
mailing list