On Saturday, 16 December 2017 at 19:57:30 UTC, Marc wrote:
Does D have something similar?
As others have said, D has UDAs.
An alternative to using __traits(getAttributes) is to use
std.traits.getUDAs [1]
I've made a small example using std.traits.getUDAs, based off of
your example. [2]
On 2017-12-16 22:11, Marc wrote:
I can't "pack" an object, right? In C#, TextSize is a class and 256 is
constructor's first argument. In D it's pretty much an array but I guess
it's close enough. Thanks!
In D it's an tuple of basically anything that is known at compile time,
values or
On Saturday, 16 December 2017 at 21:11:43 UTC, Marc wrote:
On Saturday, 16 December 2017 at 20:05:15 UTC, Anonymouse wrote:
On Saturday, 16 December 2017 at 19:57:30 UTC, Marc wrote:
C# has a quite nice way to store metadata about a property by
a feature called atributes[1]. For example, I can
On Saturday, December 16, 2017 21:11:43 Marc via Digitalmars-d-learn wrote:
> On Saturday, 16 December 2017 at 20:05:15 UTC, Anonymouse wrote:
> > On Saturday, 16 December 2017 at 19:57:30 UTC, Marc wrote:
> >> C# has a quite nice way to store metadata about a property by
> >> a feature called
On Saturday, 16 December 2017 at 20:05:15 UTC, Anonymouse wrote:
On Saturday, 16 December 2017 at 19:57:30 UTC, Marc wrote:
C# has a quite nice way to store metadata about a property by
a feature called atributes[1]. For example, I can write
something like this:
class A {
[TextSize(256)]
On Saturday, 16 December 2017 at 19:57:30 UTC, Marc wrote:
C# has a quite nice way to store metadata about a property by a
feature called atributes[1]. For example, I can write something
like this:
class A {
[TextSize(256)]
string Name { get; set; }
}
So using runtime/reflection I
C# has a quite nice way to store metadata about a property by a
feature called atributes[1]. For example, I can write something
like this:
class A {
[TextSize(256)]
string Name { get; set; }
}
So using runtime/reflection I can retrieve the TextSize value
associated to A.name
On Sunday, 2 October 2016 at 17:22:57 UTC, Basile B. wrote:
On Sunday, 2 October 2016 at 15:54:38 UTC, Satoshi wrote:
Hello,
why
pure @safe nothrow @nogc struct Point {
}
isn't same as
struct Point {
pure: @safe: nothrow: @nogc:
}
??
This is not specified but attributes aren't applied to
On Sunday, 2 October 2016 at 15:54:38 UTC, Satoshi wrote:
Hello,
why
pure @safe nothrow @nogc struct Point {
}
isn't same as
struct Point {
pure: @safe: nothrow: @nogc:
}
??
This is not specified but attributes aren't applied to the scope
created by the declaration. Which is a good thing,
Hello,
why
pure @safe nothrow @nogc struct Point {
}
isn't same as
struct Point {
pure: @safe: nothrow: @nogc:
}
??
10 matches
Mail list logo