www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to find documentation of hard-to-google keywords and symbols

reply "dnspies" <dspies ualberta.ca> writes:
I often have trouble finding documentation for keywords such as 
"in" and "is" in D.  Also, functions like "find" I expect to be 
in std.string but it's actually in std.algorithm and Tuple I 
expect to be in std.typetuple but it's actually in std.typecons.  
These make sense in retrospect, but it would be nice to have a 
lookup table.  Further, DDT for eclipse doesn't have a 
ctrl-shift-O (auto-import), so I have to remember or figure out 
by guessing every time where to find these. The isWhite function 
I want is in std.utf, but newline is only in std.ascii.  It's a 
lot to keep track of and there doesn't seem to be any easy 
reference.

Is there an alphabetical listing (with links) of all keywords and 
functions in D?
Apr 02 2014
parent reply "Gary Willoughby" <dev nomad.so> writes:
On Thursday, 3 April 2014 at 06:59:45 UTC, dnspies wrote:
 I often have trouble finding documentation for keywords such as 
 "in" and "is" in D.  Also, functions like "find" I expect to be 
 in std.string but it's actually in std.algorithm and Tuple I 
 expect to be in std.typetuple but it's actually in 
 std.typecons.  These make sense in retrospect, but it would be 
 nice to have a lookup table.  Further, DDT for eclipse doesn't 
 have a ctrl-shift-O (auto-import), so I have to remember or 
 figure out by guessing every time where to find these. The 
 isWhite function I want is in std.utf, but newline is only in 
 std.ascii.  It's a lot to keep track of and there doesn't seem 
 to be any easy reference.

 Is there an alphabetical listing (with links) of all keywords 
 and functions in D?
http://dlang.org/spec.html http://dlang.org/library/index.html
Apr 03 2014
parent reply "dnspies" <dspies ualberta.ca> writes:
On Thursday, 3 April 2014 at 09:27:29 UTC, Gary Willoughby wrote:
 On Thursday, 3 April 2014 at 06:59:45 UTC, dnspies wrote:
 I often have trouble finding documentation for keywords such 
 as "in" and "is" in D.  Also, functions like "find" I expect 
 to be in std.string but it's actually in std.algorithm and 
 Tuple I expect to be in std.typetuple but it's actually in 
 std.typecons.  These make sense in retrospect, but it would be 
 nice to have a lookup table.  Further, DDT for eclipse doesn't 
 have a ctrl-shift-O (auto-import), so I have to remember or 
 figure out by guessing every time where to find these. The 
 isWhite function I want is in std.utf, but newline is only in 
 std.ascii.  It's a lot to keep track of and there doesn't seem 
 to be any easy reference.

 Is there an alphabetical listing (with links) of all keywords 
 and functions in D?
http://dlang.org/spec.html http://dlang.org/library/index.html
Thanks, but neither of these lists contains functions or keywords. One lists high-level language concepts and the other is a list of modules. 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?
Apr 03 2014
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
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
Apr 03 2014
parent reply "dnspies" <dspies ualberta.ca> writes:
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.
Apr 03 2014
parent reply simendsjo <simendsjo gmail.com> writes:
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
Apr 03 2014
parent reply "dnspies" <dspies ualberta.ca> writes:
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.
Apr 03 2014
parent simendsjo <simendsjo gmail.com> writes:
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.
Apr 03 2014