On Tuesday, 28 August 2018 at 20:58:23 UTC, Alex wrote:
Isn't the problem, that inside a template a declaration is
expected, and not a foreach?
Boh, you're right. I guess I misunderstood mixin templates. Found
a way with a normap function though :p
void mapSelf(alias self, alias aa)()
On Tuesday, 28 August 2018 at 20:39:16 UTC, aliak wrote:
Hi,
I'm trying to do something similar to what Kotlin allows with
assigning to member variables from a map. The syntax is very
readable and looks like:
class User(val map: Map) {
val name: String by map
val age: Int by map
Hi,
I'm trying to do something similar to what Kotlin allows with
assigning to member variables from a map. The syntax is very
readable and looks like:
class User(val map: Map) {
val name: String by map
val age: Int by map
}
So I'm trying to do something similar in D:
mixin