Curious: why do you use classes instead of structs for implementations in swiftz?
Conversation
no reason. I'm probably going to end up switching them to structs where I can.
1
2
developer.apple.com/library/prerel seems to mostly favor classes. Comments? Trying to grok perf of call-by-value.
4
YES. Please more re: note there that "Swift manages all value copying to ensure optimal performance"
1
1
For instance: what if I wanted to do the unshare() trick for a struct of mine? How do I do that?
1
Replying to
You don't have to do the unshare() trick for a your structs because they're effectively passed by-value.
Replying to
is there a way make immutable arrays or should they be unshared at every API boundary?
1
Not presently; and depends on your requirements.
1
1
Show replies




