dynamicity, which in turn means, that one needs to give up on lots of
sweet stuff like templates, overloading and string mixins.
Variant is the first step towards dynamic alter-ego of D, which is
completely undeveloped currently.
Although my benchmarks show, that variant is quite slow and I'd really
like
like templates, overloading and string mixins.
Variant is the first step towards dynamic alter-ego of D, which is
completely undeveloped currently.
Although my benchmarks show, that variant is quite slow and I'd really
like a version of variant, optimized for ultimate performance.
Also
Le 25/10/2011 17:39, Gor Gyolchanyan a écrit :
That's the point. You don't always need to carry around your type.
Also because you might do it in a specific and very efficient way.
Imposing a single way of storing the type is a very inflexible decision.
The type check may also be done at
You can use opDispatch to make runtime methods and properties
by having it forward to a function to do the lookup.
Something alone these lines:
DynamicObject delegate(DynamicObject[] args) dynamicFunctions;
DynamicObject opDispatch(string name, T...)(T t) {
if(name !in dynamicFunctions)
On Wed, 26 Oct 2011 10:15:33 -0400, Gor Gyolchanyan
gor.f.gyolchan...@gmail.com wrote:
1. opDispatch is no good for overloading when the set of methods are
defined at run-time.
For those cases, you must use the runtime interface that opDispatch will
use directly. D does not have a way to
I know how opDispatch works. opDispatch is purely a syntax sugar (a
really neat one, IMO).
What I'm talking about is a way to choose between a set of functions,
based on the parameters.
It's basically dynamic overloading, but with additional ability to
overload, based on values (much like template
, overloading and string mixins.
Variant is the first step towards dynamic alter-ego of D, which is
completely undeveloped currently.
Although my benchmarks show, that variant is quite slow and I'd really
like a version of variant, optimized for ultimate performance.
Also, there are lots of stuff
of
sweet stuff like templates, overloading and string mixins.
Variant is the first step towards dynamic alter-ego of D, which is
completely undeveloped currently.
If Algebraic/Variant could be recognized by the language it would give
some interesting possibilities, like Variant array literals:
auto
dynamicity, which in turn means, that one needs to give up on lots of
sweet stuff like templates, overloading and string mixins.
Variant is the first step towards dynamic alter-ego of D, which is
completely undeveloped currently.
If Algebraic/Variant could be recognized by the language it would
and modularity means
dynamicity, which in turn means, that one needs to give up on lots of
sweet stuff like templates, overloading and string mixins.
Variant is the first step towards dynamic alter-ego of D, which is
completely undeveloped currently.
If Algebraic/Variant could be recognized by the language
templates, overloading and string mixins.
Variant is the first step towards dynamic alter-ego of D, which is
completely undeveloped currently.
If Algebraic/Variant could be recognized by the language it would give
some interesting possibilities, like Variant array literals:
auto array = [10, 2.0
app development is a very good practice and modularity means
dynamicity, which in turn means, that one needs to give up on lots of
sweet stuff like templates, overloading and string mixins.
Variant is the first step towards dynamic alter-ego of D, which is
completely undeveloped currently
On Tue, 25 Oct 2011 09:23:10 -0400, Gor Gyolchanyan
gor.f.gyolchan...@gmail.com wrote:
I need an extremely fast and small typeless container for a single
object, which i can use to implement a fast and efficient dynamic
callback mechanism, where the exact number and types of parameters are
only
That's the point. You don't always need to carry around your type.
Also because you might do it in a specific and very efficient way.
Imposing a single way of storing the type is a very inflexible decision.
The type check may also be done at different points, after which it's
not necessary to
another example is dynamic callbacks.
You may carry around typeid of the function signature and a struct,
containing parameter values for it, which also contains the typeid of
it's target function's signature.
If you don't impose type information on the typeless values, i will be
able to check the
On Tue, 25 Oct 2011 11:45:48 -0400, Gor Gyolchanyan
gor.f.gyolchan...@gmail.com wrote:
another example is dynamic callbacks.
You may carry around typeid of the function signature and a struct,
containing parameter values for it, which also contains the typeid of
it's target function's
So delegate don't work because?
Delegates won't work this way because the parameters aren't bound and
are of unknown quantity and types.
What about unions?
Unions allow only a limited number of types.
Or casting a ptr into an array of raw bytes?
This won't always work, because static
17 matches
Mail list logo