Difference between revisions of "Differences With TDPL"
m (→IFTI now uses the tail-const type of arrays and pointers: - add link) |
(Add DIP25 and DIP1000) |
||
Line 20: | Line 20: | ||
For example code, see: | For example code, see: | ||
http://forum.dlang.org/post/mfjmysleuwfohoxcslpf@forum.dlang.org | http://forum.dlang.org/post/mfjmysleuwfohoxcslpf@forum.dlang.org | ||
+ | |||
+ | === DIP25 - return ref === | ||
+ | https://dlang.org/spec/function.html#return-ref-parameters | ||
+ | |||
+ | === DIP1000 - scoped pointers === | ||
+ | https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md#fundamentals-of-scope | ||
== Unimplemented Features == | == Unimplemented Features == |
Revision as of 18:16, 29 November 2017
The following is a list of differences between D2 and The D Programming Language book by Andrei Alexandrescu.
These need to be verified. This list was simply gathered from a post by Jonathan M. Davis on the NG to get this page started.
New Features
Weak vs Strong Purity
http://klickverbot.at/blog/2012/05/purity-in-d/
New Lambda Syntax
http://dlang.org/expression.html#Lambda
New Alias Syntax, Alias Templates
http://dlang.org/declaration.html#AliasDeclaration
Attribute Inference for Templates and Function Literals
http://dlang.org/function.html#function-attribute-inference
IFTI now uses the tail-const type of arrays and pointers
For example code, see: http://forum.dlang.org/post/mfjmysleuwfohoxcslpf@forum.dlang.org
DIP25 - return ref
https://dlang.org/spec/function.html#return-ref-parameters
DIP1000 - scoped pointers
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md#fundamentals-of-scope
Unimplemented Features
Multiple alias this
You can only have one subtyping member currently.
Not all of shared's guarantees are implemented yet.
SafeD
@safe (and therefore SafeD) isn't fully implemented. So, it doesn't necessarily work quite like it's supposed to yet.
Differences
Overriding private methods
According to TDPL, you can override private, but right now only public and protected functions are virtual. I'm not sure that it's 100% clear whether the compiler will be changed to match or whether TDPL is going to have to be changed. You can look at http://d.puremagic.com/issues/show_bug.cgi?id=4542 for details.