english
english copied to clipboard
explain difference between classes and structs - basics/classes
From @wilzbach on June 24, 2016 16:47
why and when we should pick classes over struct
(reported by @claudiug)
Copied from original issue: stonemaster/dlang-tour#360
use of struct is "D-ish", because they don't require GC allocation.
Classes are great if you have one instance a couple of time and/or over the lifetime of your application.