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?
3 plus ones
Shared publicly•View activity
- 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)Aug 3, 2014
- Mention for functions auto ref, const, immutable? (Is "const" deprecated in favour of "in"? Are they different?)Aug 3, 2014
- 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.Aug 3, 2014
- Sorry, I meant that as a genuine question, not that it is deprecated. Don't understand the difference though :)Aug 3, 2014
- 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.Aug 3, 2014
- 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?Aug 3, 2014