Thread overview
Some comments on learning D using the tour
Jan 15, 2020
mark
Jan 16, 2020
Mike Parker
Jan 16, 2020
mark
Jan 16, 2020
Adam D. Ruppe
Jan 16, 2020
mark
Jan 17, 2020
James Blachly
January 15, 2020
I am learning D for the first time.

While I wait for Mike Parker's "Learning D" book to arrive, I have started using the tour.

I really like the tour, especially the fact that you can run and tweak the code as well as read the explanations.

However, what I really miss is a contents page so that I can look at each topic and jump back when I want to recap something.

For example, I haven't found one definitive place in the docs that document D's strings. I've found the std.string module's docs and the Array's string docs -- which unfortunately are not cross-ref'd with links to each other. I know that I've covered strings in the tour, but with no list of contents I can't find it without "endlessly" clicking back to find it.

Another thing I like about the tour is that the imports specify the imported functions so you can see exactly where they come from.


January 16, 2020
On Wednesday, 15 January 2020 at 20:06:01 UTC, mark wrote:


> However, what I really miss is a contents page so that I can look at each topic and jump back when I want to recap something.

Please submit an enhancement request:

https://github.com/dlang-tour/core/issues

>
> For example, I haven't found one definitive place in the docs that document D's strings.

https://dlang.org/spec/arrays.html#strings
January 16, 2020
On Wednesday, 15 January 2020 at 20:06:01 UTC, mark wrote:
> For example, I haven't found one definitive place in the docs that document D's strings.

My unofficial docs are built from the same source, so not perfect, but at least have better cross linking:

http://dpldocs.info/experimental-docs/std.string.html

might be helpful to you.
January 16, 2020
On Thursday, 16 January 2020 at 01:02:46 UTC, Mike Parker wrote:
> On Wednesday, 15 January 2020 at 20:06:01 UTC, mark wrote:
>
>
>> However, what I really miss is a contents page so that I can look at each topic and jump back when I want to recap something.
>
> Please submit an enhancement request:
>
> https://github.com/dlang-tour/core/issues

Done: https://github.com/dlang-tour/core/issues/741

>> For example, I haven't found one definitive place in the docs that document D's strings.
>
> https://dlang.org/spec/arrays.html#strings

I'd found that, as I mentioned, but it is unsatisfactory. For example, it says nothing about how to iterate the characters in a string or about the different kinds of string lengths (byte count, code point count, grapheme count).

Strings are important enough to deserve their own chapter in the online "D Programming Language". Such a chapter ought to have cross-refs to arrays and draw together _all_ the relevant string related info.
January 16, 2020
On Thursday, 16 January 2020 at 02:32:07 UTC, Adam D. Ruppe wrote:
> On Wednesday, 15 January 2020 at 20:06:01 UTC, mark wrote:
>> For example, I haven't found one definitive place in the docs that document D's strings.
>
> My unofficial docs are built from the same source, so not perfect, but at least have better cross linking:
>
> http://dpldocs.info/experimental-docs/std.string.html
>
> might be helpful to you.

Comparing
https://dlang.org/phobos/std_string.html vs
http://dpldocs.info/experimental-docs/std.string.html
I generally find yours easier to read but miss the examples that are in the std docs. And in both cases there is no coverage of (or cross-refs to coverage of) string iteration, string indexing, and byte, code point, and grapheme counting. Also yours doesn't have the search box.

I've now discovered the std.uni and std.utf modules. There really ought to be cross-refs to/from these and std.string and Array string.
January 16, 2020
On 1/15/20 3:06 PM, mark wrote:
> I am learning D for the first time.
> 
> While I wait for Mike Parker's "Learning D" book to arrive, I have started using the tour.
> 
> I really like the tour, especially the fact that you can run and tweak the code as well as read the explanations.
> 
> However, ...

Mark, thank you for your comments. It is always valuable to hear the perspective of someone approaching any problem or situation with a fresh set of eyes.