Discussion  - 
 
I created a small tutorial(which is more like an overview) of some D features for my teammates coming from the C family of languages, I figured I'd make it public. Are there any important and/or cool features that I'm missing in it? What do you guys think of it?
d-tutorial - A small showcase of the features of the D programming language.
3
Bayan Rafeh's profile photoBen Grabham's profile photo
6 comments
 
For the type section, maybe list a few of the modifiers you can have after the number for auto to deduce the correct type? (like l for long like you did, etc)
 
Mention for functions auto ref, const, immutable? (Is "const" deprecated in favour of "in"? Are they different?)
 
Are they? Const is still on the wiki, so I assume it's still part of the spec, though I don't see why one would use it as opposed to in. Maybe for CTFE?

I probably should mention auto ref and immutable though.
 
Sorry, I meant that as a genuine question, not that it is deprecated. Don't understand the difference though :)
 
The difference seems to be that when you pass a const parameter, it remains const when it exits the scope. In means it's just const inside the function's scope, it becomes mutable again when it exits the function's scope.
 
Hmmm, is that only if you need to return the input value? Otherwise I thought you can already pass in a non-const parameter and it will be implicitly converted to const?
Add a comment...