How to find documentation of hard-to-google keywords and symbols

simendsjo simendsjo at gmail.com
Thu Apr 3 13:07:09 PDT 2014


On 04/03/2014 06:50 PM, dnspies wrote:
> On Thursday, 3 April 2014 at 16:39:02 UTC, simendsjo wrote:
>> On 04/03/2014 06:31 PM, dnspies wrote:
>>> On Thursday, 3 April 2014 at 16:10:45 UTC, bearophile wrote:
>>>> dnspies:
>>>>
>>>>> I still don't know where to find documentation for "is" (which I just
>>>>> found out in another forum post is overloaded for dynamic arrays).
>>>>> Can users overload the meaning of "is" themselves?
>>>>
>>>> Here you find info on the D language:
>>>> http://dlang.org/spec.html
>>>>
>>>> "is" is an operator, so it's an expression, so you find it here:
>>>> http://dlang.org/expression
>>>>
>>>> Bye,
>>>> bearophile
>>>
>>> I don't see where it talks about how to compare dynamic arrays with
>>> "is".  It says:
>>>
>>> The forms of the IsExpression are:
>>>
>>> 1.    is ( Type )
>>> ...
>>> 2.    is ( Type : TypeSpecialization )
>>> ...
>>> 3.    is ( Type == TypeSpecialization )
>>> ...
>>> 4.    is ( Type Identifier )
>>> ...
>>> 5.    is ( Type Identifier : TypeSpecialization )
>>> ...
>>> 6.    is ( Type Identifier == TypeSpecialization )
>>> ...
>>> 7.    is ( Type : TypeSpecialization , TemplateParameterList )
>>> is ( Type == TypeSpecialization , TemplateParameterList )
>>> is ( Type Identifier : TypeSpecialization , TemplateParameterList )
>>> is ( Type Identifier == TypeSpecialization , TemplateParameterList )
>>> ...
>>>
>>> This doesn't explain "a is b" where a and b are both dynamic arrays.
>>
>> `a is b` is called the "Identity expressions" and is very different
>> from the "is expression".
>> http://dlang.org/expression.html#IdentityExpression
>
> Oh sorry.  I wouldn't have guessed there would be two different areas of
> the page dealing with different uses of the "is" keyword.  And it's not
> something I can search, because just searching the word "is" isn't much
> help.
>
> What about Tuple.  I try to use a Tuple in my code, but get:
>
> source/app.d(10): Error: template instance Tuple!(int, int) template
> 'Tuple' is not defined
>
> So I google "dlang Tuple" to find out which module I can find it in.
> The first link I get "http://dlang.org/tuple.html" has all this great
> information on how to construct and use tuples... except it fails to
> mention which module the standard tuple definition is in (anywhere on
> the entire page).
>
> Let's look at the list of D standard modules.  Searching the page for
> "tuple" reveals std.typetuple which seems promising.  Nope, no Tuple
> objects here...
>
> Does no one else see a need for an ALPHABETICAL listing of functions and
> keywords?
>
> In my mind, the problems with navigating the documentation is a HUGE
> barrier to using D effectively.

I can't argue with difficulties finding information. Here's a couple of 
links that might help:
The new layout (with clickable links): 
http://dlang.org/library/std/typecons/tuple.html
Search: http://dpldocs.info/

There's also a search function on the top that uses google.
But none of these are as advanced as "Find keyword" or "Find symbol 
definition" as you want.


More information about the Digitalmars-d-learn mailing list