View mode: basic / threaded / horizontal-split · Log in · Help
October 30, 2012
Re: Why D is annoying =P
On Tuesday, 30 October 2012 at 07:22:30 UTC, Jonathan M Davis 
wrote:
> On Tuesday, October 30, 2012 08:14:59 Rob T wrote:
>> > TDPL clearly states that each of the struct's members are
>> > supposed to
>> > be checked for equality (see section 7.1.5.2, p. 258 - 259).
>> 
>> So I guess that the POD definition of struct was changed at 
>> some
>> point?
>
> Structs never were just PODs in D. They have _way_ more 
> capabilities to them
> than that.

I do understand what you are saying, however the docs in here 
describe structs as POD's, with the capabilities you mention.
http://dlang.org/glossary.html#pod

>
> If you want bitwise comparison, then use the is operator. 
> That's what it's
> for.

Where can I find an up-to-date language reference? What I'm 
reading does not seem to be up to date or complete. For example, 
I never saw mention of the "is" operator until now.

--rt
October 30, 2012
Re: Why D is annoying =P
On Tuesday, October 30, 2012 08:37:47 Rob T wrote:
> Where can I find an up-to-date language reference? What I'm
> reading does not seem to be up to date or complete. For example,
> I never saw mention of the "is" operator until now.

It's in the online docs:

http://dlang.org/expression.html

It's in the "Identity Expressions" section. The best reference is TDPL though.

- Jonathan M Davis
October 30, 2012
Re: Why D is annoying =P
> Where can I find an up-to-date language reference? What I'm 
> reading does not seem to be up to date or complete. For 
> example, I never saw mention of the "is" operator until now.
>
> --rt

It's hard to find because it can not be overloaded.

Look here: http://dlang.org/expression.html#IdentityExpression
In TDPL it's explained as well.
October 30, 2012
Re: Why D is annoying =P
On Tue, Oct 30, 2012 at 08:57:01AM +0100, Tobias Pankrath wrote:
> >Where can I find an up-to-date language reference? What I'm
> >reading does not seem to be up to date or complete. For example, I
> >never saw mention of the "is" operator until now.
> >
> >--rt
> 
> It's hard to find because it can not be overloaded.
> 
> Look here: http://dlang.org/expression.html#IdentityExpression
> In TDPL it's explained as well.

Sigh, one of these days I'm gonna have to rewrite many of these pages.
I find them very hard to navigate and very unfriendly to newbies,
because very basic information (like what 'is' is) is buried deep in
long verbose infodumps of diverse language features, with no indication
at all which are fundamental concepts and which are just details. It's
virtually impossible to find what you're looking for unless you already
know what it is.

TDPL lays things out in a much saner fashion, but how many newbies
actually own the book? We need the online docs to be just as
newbie-friendly.


T

-- 
MSDOS = MicroSoft's Denial Of Service
October 30, 2012
Re: Why D is annoying =P
> Sigh, one of these days I'm gonna have to rewrite many of these 
> pages.
> I find them very hard to navigate and very unfriendly to 
> newbies,
> because very basic information (like what 'is' is) is buried 
> deep in
> long verbose infodumps of diverse language features, with no 
> indication
> at all which are fundamental concepts and which are just 
> details. It's
> virtually impossible to find what you're looking for unless you 
> already
> know what it is.
>
> TDPL lays things out in a much saner fashion, but how many 
> newbies
> actually own the book? We need the online docs to be just as
> newbie-friendly.
>

I agree, that the online docs are insufficient for learning the
language.
But that's the case for phobos, too. Both are just a listings of
what is there and don't give you any overview of what design
decisions were made and what implications they have.

Just take a look std.container.

I hope that Ali Çehreli efforts will be midterm solution at
least for the language docs. Maybe he should credits by linking
from the homepage to his book.
October 30, 2012
Re: Why D is annoying =P
On 2012-10-30 17:09, Tobias Pankrath wrote:

> I agree, that the online docs are insufficient for learning the
> language.
> But that's the case for phobos, too. Both are just a listings of
> what is there and don't give you any overview of what design
> decisions were made and what implications they have.
>
> Just take a look std.container.
>
> I hope that Ali Çehreli efforts will be midterm solution at
> least for the language docs. Maybe he should credits by linking
> from the homepage to his book.

A language needs several types of documentation. Reference documentation 
(basically what we have now), higher level documentation, tutorials and 
examples.

-- 
/Jacob Carlborg
October 30, 2012
Re: Why D is annoying =P
On Tue, Oct 30, 2012 at 08:50:50PM +0100, Jacob Carlborg wrote:
> On 2012-10-30 17:09, Tobias Pankrath wrote:
> 
> >I agree, that the online docs are insufficient for learning the
> >language.  But that's the case for phobos, too. Both are just a
> >listings of what is there and don't give you any overview of what
> >design decisions were made and what implications they have.
> >
> >Just take a look std.container.
> >
> >I hope that Ali Çehreli efforts will be midterm solution at
> >least for the language docs. Maybe he should credits by linking
> >from the homepage to his book.
> 
> A language needs several types of documentation. Reference
> documentation (basically what we have now), higher level
> documentation, tutorials and examples.
[...]

I contend that much of the current documentation isn't even up to
reference standard.

Incompleteness, for one thing. Things like Throwable and Exception
aren't even documented right now (though this has been fixed in git
HEAD). I'm sure there are many other fundamental holes.

And a randomly-sorted list of unrelated module items does not constitute
a reference, either. It has to be at least sorted alphabetically, or
preferably, by logical categories. And things like class members need to
be properly indented (I think this was fixed recently) instead of being
flattened out, making it impossible to discern whether it belongs to the
previous declaration or the global module scope. Moreover, nested
classes/structs, etc., need to be put AFTER simpler members. It's
basically unreadable when, for example, two int members are separated by
the docs of a 2-page nested struct.

And don't even get me started on navigability. Dumping a morass of
#-links at the top of the page does not a navigable page make. Some
modules NEED to have docs split into separate pages. A 10-page infodump
of randomly sorted items is simply impossible to use effectively.
Clickable identifiers would be nice, so that you don't have to
separately navigate and lookup a particular symbol when you're not sure
what it means, while trying to keep track of where you left off (and I
thought we were in the age of automation...).


T

-- 
The right half of the brain controls the left half of the body. This means that only left-handed people are in their right mind. -- Manoj Srivastava
Next ›   Last »
5 6 7 8 9
Top | Discussion index | About this forum | D home