learn D & TDPL
Jonathan M Davis
jmdavisProg at gmx.com
Sat Jan 21 00:42:18 PST 2012
On Saturday, January 21, 2012 09:11:52 Gour wrote:
> I'd like to re-start learning D (from scratch) using TDPL.
> However, several times I've encountered some message which says that
> there are some problems in learning the language, like:
> a) the language is not complete according to the TDPL-spec and
> b) language implementation differs from TDP (some things has changed)
> Now, I believe that a) case can be solved by looking at and/or fixing
> bugs tagged as 'tdpl', but I wonder if there is some document
> documenting b) case and listing where/how D2 parted of the TDPL?
> Any other hint you can share for learning D2?
As for new or altered features... The list isn't very long, I don't believe.
1. weak vs strong purity
2. new lambda syntax (which hasn't even been released yet, I don't believe)
3. attribute inferrence for templates and delegates (or at least delegate
literals - I'm not sure exactly when delegates get their attributes inferred)
4. IFTI now uses the tail-const type of arrays and pointers
There might be some other minor things, but for the most part, the language
hasn't really been changed from what's described in TDPL. The main problem is
that the compiler hasn't caught up to TDPL yet. The biggest items in that
regard that I can think of are
1. TDPL says that you can multiple aliases this-es per type, but right now,
you can only have one.
2. Not all of shared's guarantees are implemented yet.
3. You can't overload templated functions with non-templated functions yet.
4. According to TDPL, you can override private, but right now only public and
protected functions are virtual. I'm not sure that it's 100% clear whether the
compiler will be changed to match or whether TDPL is going to have to be
changed. You can look at http://d.puremagic.com/issues/show_bug.cgi?id=4542
5. @safe (and therefore SafeD) isn't fully implemented. So, it doesn't
necessarily work quite like it's supposed to yet.
There are probably a few others, but that's what I can think of at the moment.
One of the big ones that got fixed recently though was inout. That was broken
- Jonathan M Davis
More information about the Digitalmars-d-learn