Spec

Jacob Carlborg doob at me.com
Thu Apr 5 13:00:56 PDT 2012


On 2012-04-05 17:57, Andrej Mitrovic wrote:
> On 4/5/12, Steven Schveighoffer<schveiguy at 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


More information about the Digitalmars-d mailing list