Jump to page: 1 2
Thread overview
learn D & TDPL
Jan 21, 2012
Gour
Jan 21, 2012
Jonathan M Davis
Jan 21, 2012
Gour
Jan 21, 2012
Jonathan M Davis
Jan 21, 2012
Gour
Jan 21, 2012
Jonathan M Davis
Jan 24, 2012
Daniel Murphy
Jan 24, 2012
Daniel Murphy
Jan 23, 2012
Brad Anderson
Jan 24, 2012
Gour
Jan 24, 2012
F i L
Jan 24, 2012
Dejan Lekic
Jan 24, 2012
Gour
Jan 24, 2012
Jonathan M Davis
January 21, 2012
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?


Sincerely,
Gour

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

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


January 21, 2012
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
January 21, 2012
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


-- 
A person who has given up all desires for sense gratification, who lives free from desires, who has given up all sense of proprietorship and is devoid of false ego — he alone can attain real peace.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


January 21, 2012
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
January 21, 2012
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

-- 
The spirit soul bewildered by the influence of false ego thinks himself the doer of activities that are in actuality carried out by the three modes of material nature.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


January 21, 2012
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
January 23, 2012
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


January 24, 2012
"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


January 24, 2012
"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.


January 24, 2012
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

-- 
Whatever action a great man performs, common men follow. And whatever standards he sets by exemplary acts, all the world pursues.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


« First   ‹ Prev
1 2