View mode: basic / threaded / horizontal-split · Log in · Help
April 05, 2012
Re: Spec
On 4/5/12, Steven Schveighoffer <schveiguy@yahoo.com> wrote:
> I was completely wrong in what I thought the compiler couldn't do, because the
> spec is lacking.

I think it's very sad that even an old-timer like Steven has been
tricked by the spec. It doesn't leave much hope for the newbies who
didn't get a copy of TDPL.

Some text needs to be wrapped inside of $(D1) sections ASAP. Things
like scope classes, scope variables, class allocators..

Also there's some outdated information, e.g.
"Nested structs cannot be used as fields or as the element type of an
array". <- Not true

"Multiple AliasThis are allowed.". <- this should be allowed, but it's
been on the website for *years* and it still doesn't exist. How are
users supposed to react to a feature advertised as working? A
to-be-implemented note should be added.

"For dynamic array and object parameters, which are passed by
reference" <- AFAIK Dynamic arrays are passed by value.

"Member functions of nested classes and structs do not have access to
the stack variables of the enclosing function, but do have access to
the other symbols" <- Not true
April 05, 2012
Re: Spec
On Thu, 05 Apr 2012 11:57:14 -0400, Andrej Mitrovic  
<andrej.mitrovich@gmail.com> wrote:

> On 4/5/12, Steven Schveighoffer <schveiguy@yahoo.com> wrote:
>> I was completely wrong in what I thought the compiler couldn't do,  
>> because the
>> spec is lacking.
>
> I think it's very sad that even an old-timer like Steven has been
> tricked by the spec. It doesn't leave much hope for the newbies who
> didn't get a copy of TDPL.

Who are you calling old-timer? ;)

I think this is a bit of an exaggeration.  Most of the spec is correct.   
You can get pretty far without TDPL in D2.

>
> Some text needs to be wrapped inside of $(D1) sections ASAP. Things
> like scope classes, scope variables, class allocators..
>
> Also there's some outdated information, e.g.
> "Nested structs cannot be used as fields or as the element type of an
> array". <- Not true
>
> "Multiple AliasThis are allowed.". <- this should be allowed, but it's
> been on the website for *years* and it still doesn't exist. How are
> users supposed to react to a feature advertised as working? A
> to-be-implemented note should be added.
>
> "For dynamic array and object parameters, which are passed by
> reference" <- AFAIK Dynamic arrays are passed by value.
>
> "Member functions of nested classes and structs do not have access to
> the stack variables of the enclosing function, but do have access to
> the other symbols" <- Not true

I think you should put together a pull request for these, or at least file  
a bug.

-Steve
April 05, 2012
Re: Spec
On 4/5/12, Steven Schveighoffer <schveiguy@yahoo.com> wrote:
> Who are you calling old-timer? ;)

Heheh, I meant that with respect! Respect the ol' wizards of D. :p

I'll make a pull for those things later.
April 05, 2012
Re: Spec
On 2012-04-05 17:57, Andrej Mitrovic wrote:
> On 4/5/12, Steven Schveighoffer<schveiguy@yahoo.com>  wrote:
>> I was completely wrong in what I thought the compiler couldn't do, because the
>> spec is lacking.
>
> I think it's very sad that even an old-timer like Steven has been
> tricked by the spec. It doesn't leave much hope for the newbies who
> didn't get a copy of TDPL.
>
> Some text needs to be wrapped inside of $(D1) sections ASAP. Things
> like scope classes, scope variables, class allocators..
>
> Also there's some outdated information, e.g.
> "Nested structs cannot be used as fields or as the element type of an
> array".<- Not true
>
> "Multiple AliasThis are allowed.".<- this should be allowed, but it's
> been on the website for *years* and it still doesn't exist. How are
> users supposed to react to a feature advertised as working? A
> to-be-implemented note should be added.
>
> "For dynamic array and object parameters, which are passed by
> reference"<- AFAIK Dynamic arrays are passed by value.
>
> "Member functions of nested classes and structs do not have access to
> the stack variables of the enclosing function, but do have access to
> the other symbols"<- Not true

This has been a problem for ages. There isn't a real specification. And 
the arrival of TDPL didn't make things better (in this case).

-- 
/Jacob Carlborg
April 05, 2012
Re: Spec
On 4/5/2012 11:09 AM, Andrej Mitrovic wrote:
> On 4/5/12, Steven Schveighoffer<schveiguy@yahoo.com>  wrote:
>> Who are you calling old-timer? ;)
>
> Heheh, I meant that with respect! Respect the ol' wizards of D. :p
>
> I'll make a pull for those things later.

Yes, please do.
Top | Discussion index | About this forum | D home