News for hackers. Stuff that matters.
Re:Specification for the D Programming Language by edflsafoiewq on Wednesday January 08, 2020 @02:39PM (#21994938)
Does D have something like Rust's #[derive(Debug)] or #[derive(Hash)]?
Re:Specification for the D Programming Language by Neku42 on Wednesday January 08, 2020 @02:55PM (#21995093)
Standard library doesn’t provide similar functionality but it’s trivial to implement a mixin template that would implement print or hash function for any type

That being said standard formatting function can automatically print most types including user types. This eliminates necessity for automatic formatting implementation in majority of situations

Re:Specification for the D Programming Language by mhh__ on Wednesday January 08, 2020 @09:13PM (#21997891)
Not really required because serialization is trivial in D.

D's compilation isn't "stateful" like that in the sense that (user-defined) attributes both cannot influence the thing they are attached to or do anything without being read by something else.