Bence Zsigmond Nagy
01/22/2019, 7:59 PMstruct
in C#, Swift or even plain-old C)? I see there are a lot of similarities between the two concepts (let's say one is struct
in Swift): they can implement interfaces/protocols, can have properties, methods, and both are allocated on the stack without any memory overhead (please correct me if I'm wrong). What are the differences other than Inline classes can only have one underlying primitive type?Dominaezzz
01/22/2019, 8:13 PMorangy
01/22/2019, 8:24 PMcan only have one underlying primitive typenot necessary primitive
ghedeon
01/22/2019, 9:10 PMallocated on the stackwhy on the stack? Isn't it heap most of the time?
karelpeeters
01/22/2019, 9:35 PMzokipirlo
01/23/2019, 8:17 AMghedeon
01/23/2019, 8:19 AM