> On Aug 26, 2019, at 4:41 PM, Pier Bover via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
> I'd prefer avoiding C++ if possible.

I had a similar dilemma in 2015 but went with C++, despite earlier bad 
experiences with it. I've been happy with my choice; C++11 improved the 
language quite a lot and C++17 even further. I resist the urge to do crazy 
things with templates, and built some of my own infrastructure like ref-counted 
objects instead of using STL's.

> My first choice would have been using
> Go which can compile to .so shared objects but Xcode cannot use those
> without some bridge written in C.

I spent several years coding in Go. It's a nice language on its own, but its 
runtime does not play well with others. Go's roots are in a completely 
nonstandard OS (Plan9) and it shows. Go has its own function-call ABI, its own 
stack management, its own GC heap. This means it's impractical to add a Go 
library to a non-Go app (you have to instead let Go own the process and then 
load & call into non-Go code); and other developer tools like debuggers and 
crash analyzers are useless with Go code because they don't understand its 
stack frames.

(Disclaimer: I've been away from the Go community for a few years, so some of 
the above may have been resolved, but I doubt it since the custom runtime is 
key to the way Go works, i.e. supporting zillions of threads.)

> I've read Rust can compile to a dylib for Xcode.

I have not used Rust, though I've read a fair bit about it. It looks a lot more 
amenable for use in an app, since its runtime is lighter and its code 
generation is done by LLVM. The downside is that (according to many) Rust 
programming has a significant learning curve because of its memory-ownership 
rules.

And BTW: I don't know if there's been any progress on running Swift on Windows? 
It's pretty solid on Linux these days.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to