www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - learn D & TDPL

reply Gour <gour atmarama.net> writes:
Hello!

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=20

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?=20


Sincerely,
Gour

--=20
But for one who takes pleasure in the self, whose human life=20
is one of self-realization, and who is satisfied in the self only,=20
fully satiated =E2=80=94 for him there is no duty.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 21 2012
next sibling parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Saturday, January 21, 2012 09:11:52 Gour wrote:
 Hello!
 
 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?
http://erdani.com/tdpl/errata/ 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 for details. 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 for ages. - Jonathan M Davis
Jan 21 2012
next sibling parent reply Gour <gour atmarama.net> writes:
On Sat, 21 Jan 2012 00:42:18 -0800
Jonathan M Davis <jmdavisProg gmx.com> wrote:

 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.
Thank you very much. Your post deserves to be filed in my D-archive here. ;)
 The main problem is that the compiler hasn't caught up to TDPL yet.
Yeah, but, at least, those things are tagged as 'tdpl' bugs, right?
 The biggest items in that regard that I can think of are
Your list is very helpful, but we consider there should be official list provided somewhere on the D site. Sincerely, Gour --=20 A person who has given up all desires for sense gratification,=20 who lives free from desires, who has given up all sense of=20 proprietorship and is devoid of false ego =E2=80=94 he alone can=20 attain real peace. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 21 2012
parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Saturday, January 21, 2012 09:55:36 Gour wrote:
 On Sat, 21 Jan 2012 00:42:18 -0800
 
 Jonathan M Davis <jmdavisProg gmx.com> wrote:
 The main problem is that the compiler hasn't caught up to TDPL yet.
Yeah, but, at least, those things are tagged as 'tdpl' bugs, right?
In theory. I don't know if they all are. The major one should be though.
 The biggest items in that regard that I can think of are
Your list is very helpful, but we consider there should be official list provided somewhere on the D site.
Probably. But documentation isn't exactly our strong suit around here. The documention on the modules themselves tends to be fairly good, but beyond that, it's pretty sparse. The main documentation is also the spec, so it tends to be quite short and to the point rather than explanatory, and pretty much the only other piece of major documentation on the site is the articles, which are helpful, but there certainly aren't enough to explain everything that probably should be explained but isn't (ranges being _the_ prime example). There's probably a _lot_ of stuff which could be done to improve the documentation. - Jonathan M Davis
Jan 21 2012
prev sibling parent reply Gour <gour atmarama.net> writes:
On Sat, 21 Jan 2012 00:42:18 -0800
Jonathan M Davis <jmdavisProg gmx.com> wrote:

 5.  safe (and therefore SafeD) isn't fully implemented. So, it
 doesn't necessarily work quite like it's supposed to yet.
This one is really interesting for our use of D, so we wonder if there is some estimation when SafeD will be available? Sincerely, Gour --=20 The spirit soul bewildered by the influence of false ego thinks=20 himself the doer of activities that are in actuality carried out=20 by the three modes of material nature. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 21 2012
parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Saturday, January 21, 2012 14:38:56 Gour wrote:
 On Sat, 21 Jan 2012 00:42:18 -0800
 
 Jonathan M Davis <jmdavisProg gmx.com> wrote:
 5.  safe (and therefore SafeD) isn't fully implemented. So, it
 doesn't necessarily work quite like it's supposed to yet.
This one is really interesting for our use of D, so we wonder if there is some estimation when SafeD will be available?
It's partially available. It just isn't fully implemented, and I don't know what's missing from it. And I have no idea when it will be fully implemented. You can certainly use it now, but I don't know how much you can really mark as safe at this point, and I don't know how accurate the compiler is in determining what's safe beyond the simple restriction that it can't call functions which aren't trusted or safe. - Jonathan M Davis
Jan 21 2012
next sibling parent "Daniel Murphy" <yebblies nospamgmail.com> writes:
"Jonathan M Davis" <jmdavisProg gmx.com> wrote in message 
news:mailman.659.1327175391.16222.digitalmars-d-learn puremagic.com...
 It's partially available. It just isn't fully implemented, and I don't 
 know
 what's missing from it. And I have no idea when it will be fully 
 implemented.
 You can certainly use it now, but I don't know how much you can really 
 mark as
  safe at this point, and I don't know how accurate the compiler is in
 determining what's  safe beyond the simple restriction that it can't call
 functions which aren't  trusted or  safe.

 - Jonathan M Davis 
Jan 23 2012
prev sibling parent "Daniel Murphy" <yebblies nospamgmail.com> writes:
"Jonathan M Davis" <jmdavisProg gmx.com> wrote in message 
news:mailman.659.1327175391.16222.digitalmars-d-learn puremagic.com...
 It's partially available. It just isn't fully implemented, and I don't 
 know
 what's missing from it. And I have no idea when it will be fully 
 implemented.
 You can certainly use it now, but I don't know how much you can really 
 mark as
  safe at this point, and I don't know how accurate the compiler is in
 determining what's  safe beyond the simple restriction that it can't call
 functions which aren't  trusted or  safe.

 - Jonathan M Davis
Most of it was implemented last year. There are still plenty of bugs but the majority of it is working. List of things that have been disabled in safe in the last 7 months or so: - Unsafe pointer arithmetic - Unsafe casting of pointers - Unsafe unions - Catching errors - Casting to/from immutable/shared/const - Taking the address of stack variables - void initializers - Unsafe array casts and probably some others.. It won't give you strong guarantees at this point, but it will catch lots of unsafe stuff.
Jan 23 2012
prev sibling next sibling parent reply Brad Anderson <eco gnuk.net> writes:
On Sat, Jan 21, 2012 at 1:42 AM, Jonathan M Davis <jmdavisProg gmx.com>wrote:

 On Saturday, January 21, 2012 09:11:52 Gour wrote:
 Hello!

 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?
http://erdani.com/tdpl/errata/ 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 for details. 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 for ages. - Jonathan M Davis
This is a very helpful post, Jonathan. I think the documentation could do with a "Changes and additions since TDPL" section with stuff like this so users aren't surprised. Users could easily mistake changes for bugs without these being documented somewhere other than the newsgroup. Regards, Brad Anderson
Jan 23 2012
parent Gour <gour atmarama.net> writes:
On Mon, 23 Jan 2012 12:37:45 -0700
Brad Anderson <eco gnuk.net> wrote:

 This is a very helpful post, Jonathan.  I think the documentation
 could do with a "Changes and additions since TDPL" section with stuff
 like this so users aren't surprised.  Users could easily mistake
 changes for bugs without these being documented somewhere other than
 the newsgroup.
+1 It can keep some frustrated users to go away when knowing exactly what is the problem. Sincerely, Gour --=20 Whatever action a great man performs, common men follow. And=20 whatever standards he sets by exemplary acts, all the world pursues. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 23 2012
prev sibling next sibling parent "F i L" <witte2008 gmail.com> writes:
I own TDPL. The discrepancies are few and far between.
Jan 24 2012
prev sibling parent reply "Dejan Lekic" <dejan.lekic gmail.com> writes:
Many things changed since the book has been released. I is 
strange that you did not see the link to the TDLP errata 
(http://erdani.com/tdpl/errata/) by now. :)
Jan 24 2012
parent reply Gour <gour atmarama.net> writes:
On Tue, 24 Jan 2012 13:41:31 +0100
"Dejan Lekic" <dejan.lekic gmail.com> wrote:

 Many things changed since the book has been released. I is=20
 strange that you did not see the link to the TDLP errata=20
 (http://erdani.com/tdpl/errata/) by now. :)
I saw errata, but one does not expect to consult book's errata for the changes in the language, imho. ;) Sincerely, Gour --=20 Everyone is forced to act helplessly according to the qualities=20 he has acquired from the modes of material nature; therefore no=20 one can refrain from doing something, not even for a moment. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 24 2012
parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Tuesday, January 24, 2012 14:03:01 Gour wrote:
 On Tue, 24 Jan 2012 13:41:31 +0100
 
 "Dejan Lekic" <dejan.lekic gmail.com> wrote:
 Many things changed since the book has been released. I is
 strange that you did not see the link to the TDLP errata
 (http://erdani.com/tdpl/errata/) by now. :)
I saw errata, but one does not expect to consult book's errata for the changes in the language, imho. ;)
I haven't looked over the errata recently, but i don't think that it even lists any changes to the language (just errors to the book), since so few changes to the language (of which there aren't many in the first place) affect the book. About the only change that it needs would be for its section on purity to be somewhat revised, but even that doesn't need drastic changes. - Jonathan M Davis
Jan 24 2012