On Monday, 30 September 2013 at 17:19:44 UTC, Jacob Carlborg wrote:
On 2013-09-30 16:08, Dicebot wrote:

I don't think there is a common consensus here. Don't even think it is
possible. Doom of proper multi-paradigm language :)

At least a few point can be made, like:

* For reference types use classes, or use structs with reference counting
* For sub typing use classes, or use structs with alias this
* For polymorphic types use classes
* For value types use structs
* For deterministic destruction use structs

That's a good point to start. The points above could be fleshed out in a tutorial or article. Another good section would be the pitfalls involved in using structs. I think it was H. S. Teoh who mentioned a subtle bug due to a missing ref or something like that.

Reply via email to