Ask HN: Safe languages available on all major platforms?
I'm thinking about an application that I'd like to deploy on all major platforms (OSX, Linux, Windows, iOS, Android). My go to language is C++, but I'd like to use a type- and memory-safe language (goodbye, buffer overflows). What are my realistic options? Rust, golang and ocaml come to mind, although it doesn't look like there is official ocaml support for iOS/Android. Any other good options I'm overlooking? Any experience you can share? How is integration with native libraries and services (e.g., UI, networking, file system)? Thanks!
17 comments
[ 2.9 ms ] story [ 85.7 ms ] threadUnfortunately, the most portable language is JavaScript, and that isn't what you're looking for.
.NET is now licensed under MIT and is being developed out in the open by Microsoft on GitHub. vNext (5.0) is being concurrently developed/tested on linux (mono), osx (mono) and windows. https://github.com/aspnet/home which also means the platform is being unshackled from IIS via project OWIN (http://whereslou.com/2014/06/10/asp-net-vnext-moving-parts-o...) and the SDK is no longer a system wide installation, instead it ships with your application (https://github.com/aspnet/XRE) which enables .NET to be dockerized. Visual Studio is no longer required (it's preferred) but there are other options -> http://www.omnisharp.net/
Check out http://www.hanselman.com/blog/IntroducingASPNETVNext.aspx for a overview.
https://xamarin.com/platform
Even if it did, helping to put food on his table would benefit the open source community. There aren't many people about whom that can be said with less doubt.
https://en.m.wikipedia.org/wiki/Miguel_de_Icaza
https://store.xamarin.com/
One reason cross platform tools often require payment is that Apple's terms for the iOS app store require the use of Apple products for development. Part of the cost goes to maintaining remote services on Macs to comply with those terms.
The alternative for iOS development is to purchase, rent, or borrow a Mac and develop in Objective-C, Swift, or JavaScript. That's probably less optimized for type safety, cost, and cross platform deployment.
If you drop iOS, the JVM and Java is an alternative.
https://github.com/Microsoft/dotnet/blob/master/LICENSE
Xamarin/Mono is LGPLv2:
http://xamarin.com/licensing
Purchasing a Xamarin license removes the LGPLv2 restrictions. If you have a established open source project then you can apply for free Xamarin licenses @ http://resources.xamarin.com/open-source-contributor.html
Probably be easier for the non-GUI parts. Networking and filesystem is probably trivial. It doesn't sound like you need much access to the device otherwise, but that would be something I would check before using -- they probably do some kind of native-bridge.
Fantastic employment prospects, completely open source, runs on all desktop and mobile platforms.