Using D
via Digitalmars-d
digitalmars-d at puremagic.com
Mon Aug 25 09:08:52 PDT 2014
On Monday, 25 August 2014 at 14:54:33 UTC, ketmar via
Digitalmars-d wrote:
> D is aimed to generate efficient machine code, so it must be
> "static".
> we can emulate dynamic calls with AA and opDispatch, but this
> will
> be... not fast. ;-)
Beta was static and compiled directly to asm. That does not
preclude dynamism such as type variables, hidden parent pointers
(where the object instanced from) and a rich set of virtual
bindings and the ability to specialize everwhere.
Examples:
- a type variable is essentially just a pointer to a
typeinfo-block with constructors and meta information.
- a virtual type specification is just a type variable that is
constrained to a class hierarchy.
- to have specialization everywhere you just add the capability
to have unnamed types
Ola
More information about the Digitalmars-d
mailing list