Pre-alpha D language online tour

jmh530 via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 29 10:10:33 PDT 2016


On Tuesday, 29 March 2016 at 16:26:27 UTC, André wrote:
> Or just drop me a message where you find a bug and I'll have it 
> fixed.
>

Looks good. A few suggestions, some content, some typo.

D Basics (fix capitalization?):

Page 3, code example at the bottom right does not compile with 
@system. Also, D allows pointer arithmetic in @trusted code, so 
the text above it is not completely accurate. I would change the 
line

> D also allows pointer arithmetic. This is not allowed in code 
> which is marked as @safe but only in @system code.

to

D allows pointer arithmetic, except in code that is marked as 
@safe

Page 4, This line on const is confusing

> To a const object can't be written, but someone holding a 
> mutable to the same object might just well.

I feel like the static keyword is complicated enough that it 
could get its own slide (or multiple). Why not just put the 
variable at the top level without static?

Page 7, the discussion on delegates could be clearer.

D Gems:
Page 3, put the code examples on a separate line.

Page 7, I would re-write the last line as

The attribute pure is automatically inferred by the compiler for 
templated functions and auto functions, where applicable (this is 
also true of @safe, nothrow, and @nogc).

Page 8, I was not aware of invariant. I feel like I have a struct 
somewhere that could use it!

Page 10, might also mention @safe.

Page 13, conditionnally is spelled wrong.

I feel like static if with templates could get a whole page by 
itself.

Concurrency:
Maybe re-name Multithreading? I wouldn't consider std.parallelism 
a way to implement concurrency.

VibeD:
Page 1: Define asynchronous I/O and why it matters. I see a short 
explanation near the end of Page 2, but I feel like it should be 
brought up to the front. Maybe make that big paragraph into a 
list of key vibe-d features and why they matter.


More information about the Digitalmars-d mailing list