rtInfo through attributes implemented. Jacob, have i done it the
way you wanted?
https://github.com/D-Programming-Language/druntime/pull/775#issuecomment-41278520
On Thursday, 24 April 2014 at 06:08:11 UTC, Jacob Carlborg wrote:
On 24/04/14 00:29, Martin Nowak wrote:
Looks fairly interesting, because it partly solves the issue
to allow
custom rtinfo.
I don't like this solution for custom RTInfo. It requires you
to change your type. I would rather mod
Also, this whole thing is not only about RT registration, it may
be used differently. The next usage that comes to mind after RT
is validating proper inheritance. E.g. Some root class wants it's
subclasses to always have a default ctor available, which again
can be verified in CT.
I guess this could be done without modifying the compiler, just
extend RTInfo(T) to support this UDA, but there's a problem
with attributes. They don't propagate to class' children, thus
they can't solve the main question of this topic.
But as an additional feature such UDA might be useful.
On Thursday, 24 April 2014 at 06:08:11 UTC, Jacob Carlborg wrote:
On 24/04/14 00:29, Martin Nowak wrote:
Looks fairly interesting, because it partly solves the issue
to allow
custom rtinfo.
I don't like this solution for custom RTInfo. It requires you
to change your type. I would rather mod
On 24/04/14 00:29, Martin Nowak wrote:
Looks fairly interesting, because it partly solves the issue to allow
custom rtinfo.
I don't like this solution for custom RTInfo. It requires you to change
your type. I would rather modify the compiler to do something like this:
* Add a UDA to druntim
On Wednesday, 23 April 2014 at 16:06:58 UTC, Yuriy wrote:
Ok, i've added a pull request to be discussed. It expands
RTInfo capability as Jacob suggested. What do you think?
https://github.com/D-Programming-Language/druntime/pull/775
Looks fairly interesting, because it partly solves the issue
Ok, i've added a pull request to be discussed. It expands RTInfo
capability as Jacob suggested. What do you think?
https://github.com/D-Programming-Language/druntime/pull/775
"Steven Schveighoffer" wrote in message
news:op.xerz7jcceav7ka@stevens-macbook-pro-2.local...
Did you type that with a straight face?
:)
On Wed, 23 Apr 2014 02:34:52 -0400, Daniel Murphy
wrote:
"Yuriy" wrote in message news:duumbptvbqwknucxg...@forum.dlang.org...
Any way to do it without patching druntime?
Patch the compiler.
Did you type that with a straight face?
-Steve
"Yuriy" wrote in message news:duumbptvbqwknucxg...@forum.dlang.org...
Any way to do it without patching druntime?
Patch the compiler.
On 22/04/14 22:50, Yuriy wrote:
Any way to do it without patching druntime?
Not that I know of.
--
/Jacob Carlborg
Any way to do it without patching druntime?
On 2014-04-22 11:20, Yuriy wrote:
Hello, is there a way of getting CT info of a class' children?
Not in a pretty way but I think this should work:
* Implement a custom RTInfo in object.d in druntime. This template will
be instantiated with all user defined types
* For each type that is a cl
Hello, is there a way of getting CT info of a class' children?
If no, what do you think of a new feature for DMD: template this
static ctors/dtors:
class A
{
static this(this T)()
{
writeln("static this(", T.stringof, ")");
}
}
class B : A
{
}
would output:
static this(A
15 matches
Mail list logo