Such a nice guide! You can blame Apple for many things but not for their language! After working with Swift for a couple months when I went back to C# for a project I was really terrified with the amount of things that could go wrong and the compiler just didn’t care about!
I'm not sold that we shouldn't aim for letting the compiler handle this. The compiler knows how many general purpose registers are available, tries to optimise graph colouring problems to effectively use the registers, etc. It has good information available to determine if CoW would be a performance improvement. Might take a while in a bigger system to analyse that but still. It's good to give programmers control of this behaviour especially for library development but I would prefer an approach where the compiler making a judgment was default and programmers could explicitly CoW or request the compiler never CoW it
Such a nice guide! You can blame Apple for many things but not for their language! After working with Swift for a couple months when I went back to C# for a project I was really terrified with the amount of things that could go wrong and the compiler just didn’t care about!
Great talk. I wish I found it earlier!
Great talk, thanks Johannes! 👏
3:43 -
12:36 copy on write
I'm not sold that we shouldn't aim for letting the compiler handle this. The compiler knows how many general purpose registers are available, tries to optimise graph colouring problems to effectively use the registers, etc. It has good information available to determine if CoW would be a performance improvement. Might take a while in a bigger system to analyse that but still. It's good to give programmers control of this behaviour especially for library development but I would prefer an approach where the compiler making a judgment was default and programmers could explicitly CoW or request the compiler never CoW it