C++
Sean Kelly
sean at f4.ca
Thu Jun 29 13:39:29 PDT 2006
David Medlock wrote:
> Its adherents rarely surprise me anymore.
>
> Read my post on LTU and snk_kid's response:
> http://lambda-the-ultimate.org/node/1583#comment-19266
>
> I am not trying to single him out, but the responses are pretty common
> in my (arguably anectdotal) experience.
>
> C++ is getting X in next version...
> Using boost/somelib we can do X...
> GC/Feature N will be great for C++ but for language Y its slow...
>
> Sigh.
>
> Its funny when people bring up libraries to make their points.
Not for C++. For better or worse, a primary design goal of C++ was keep
as much as possible out of the language definition by supporting user
defined types that are indistinguishable from built-in types. So a
valid comparison to C++ must necessarily include what can be done in
library code.
That said, I don't agree with many of snk_kid's observations. D *does*
support implicit template instantiation, for example. The compiler
implementation is just incomplete. As for concepts, I do think they
would be useful in D but I think they're less necessary than in C++
because D has static if and static assert. Also, you can inherit from
template type parameters as far as I know.
As for boost::function--it's a horrible bit of code and is far more
awkward to use than delegates (particularly anonymous delegates) but it
works pretty well aside from all that. However, snk_kid doesn't address
the idea that inner functions (ie. delegates) have access to local stack
data, or that actually defining a new boost::function is nothing at all
like defining a plain old function--it's obviously a class-based hack.
Meta logic is much the same... it's possible in C++ but is far more
awkward. And C++ obviously doesn't support strings or decimal numbers
as template value parameters. Not to mention aliases.
I think one problem is that some people just look at the spec to learn
about the language, and the spec is quite sparse in places. I don't
think it mentions implicit template instantiation, and mention of some
other features is hard to find.
> Walter you have your work cut out for you.
> Like most things in IT, the human/political issues outweigh the
> technical ones.
Always. But as long as D remains in development and isn't supplanted by
some magic new language with all of D's features *and* a My Little Pony
(tm) then it will have users. Particularly with GDC available for the
non-Windows folks.
Sean
More information about the Digitalmars-d
mailing list