Ask HN: Best language for cross-platform mobile (non-UI) code? (Go? Haxe? C++?)
I'm experimenting with making a cross-platform library (specifically for iOS and Android) and I'm curious to hear what languages other people who have done it ended up using. The most obvious first thought is C++. I've only lightly dabbled in it, and the most frequent opinion I hear is that C++ is more "necessary evil" than "a delight to work with". So I started looking at alternatives, having used none of them before. Go has built-in functionality to make Go code callable from Objective C and Java. But it's still the Go runtime underneath, just proxied out to native. By comparison, Haxe can output both C++ and Java. Presumably it has some cleverness built into C++ to handle garbage collection, but it sounds like the output is more "pure" than Go would be. But does that even matter? Haxe definitely feels like a more familiar language to write, but a more obscure language in terms of raw popularity (but it has generics!). Go feels more alien (and I'm concerned that it doesn't seem to let you explicitly handle threads, which has bitten me on iOS before), but everything I'm reading about how it's structured, testing etc. just feels very sensible . Has anyone used any of these options to make a cross-platform library? Or is there another one I haven't thought of? I'm curious to hear any experiences. 0 comments on Hacker News.
I'm experimenting with making a cross-platform library (specifically for iOS and Android) and I'm curious to hear what languages other people who have done it ended up using. The most obvious first thought is C++. I've only lightly dabbled in it, and the most frequent opinion I hear is that C++ is more "necessary evil" than "a delight to work with". So I started looking at alternatives, having used none of them before. Go has built-in functionality to make Go code callable from Objective C and Java. But it's still the Go runtime underneath, just proxied out to native. By comparison, Haxe can output both C++ and Java. Presumably it has some cleverness built into C++ to handle garbage collection, but it sounds like the output is more "pure" than Go would be. But does that even matter? Haxe definitely feels like a more familiar language to write, but a more obscure language in terms of raw popularity (but it has generics!). Go feels more alien (and I'm concerned that it doesn't seem to let you explicitly handle threads, which has bitten me on iOS before), but everything I'm reading about how it's structured, testing etc. just feels very sensible . Has anyone used any of these options to make a cross-platform library? Or is there another one I haven't thought of? I'm curious to hear any experiences.
I'm experimenting with making a cross-platform library (specifically for iOS and Android) and I'm curious to hear what languages other people who have done it ended up using. The most obvious first thought is C++. I've only lightly dabbled in it, and the most frequent opinion I hear is that C++ is more "necessary evil" than "a delight to work with". So I started looking at alternatives, having used none of them before. Go has built-in functionality to make Go code callable from Objective C and Java. But it's still the Go runtime underneath, just proxied out to native. By comparison, Haxe can output both C++ and Java. Presumably it has some cleverness built into C++ to handle garbage collection, but it sounds like the output is more "pure" than Go would be. But does that even matter? Haxe definitely feels like a more familiar language to write, but a more obscure language in terms of raw popularity (but it has generics!). Go feels more alien (and I'm concerned that it doesn't seem to let you explicitly handle threads, which has bitten me on iOS before), but everything I'm reading about how it's structured, testing etc. just feels very sensible . Has anyone used any of these options to make a cross-platform library? Or is there another one I haven't thought of? I'm curious to hear any experiences. 0 comments on Hacker News.
I'm experimenting with making a cross-platform library (specifically for iOS and Android) and I'm curious to hear what languages other people who have done it ended up using. The most obvious first thought is C++. I've only lightly dabbled in it, and the most frequent opinion I hear is that C++ is more "necessary evil" than "a delight to work with". So I started looking at alternatives, having used none of them before. Go has built-in functionality to make Go code callable from Objective C and Java. But it's still the Go runtime underneath, just proxied out to native. By comparison, Haxe can output both C++ and Java. Presumably it has some cleverness built into C++ to handle garbage collection, but it sounds like the output is more "pure" than Go would be. But does that even matter? Haxe definitely feels like a more familiar language to write, but a more obscure language in terms of raw popularity (but it has generics!). Go feels more alien (and I'm concerned that it doesn't seem to let you explicitly handle threads, which has bitten me on iOS before), but everything I'm reading about how it's structured, testing etc. just feels very sensible . Has anyone used any of these options to make a cross-platform library? Or is there another one I haven't thought of? I'm curious to hear any experiences.
Hacker News story: Ask HN: Best language for cross-platform mobile (non-UI) code? (Go? Haxe? C++?)
Reviewed by Tha Kur
on
November 01, 2017
Rating:
No comments: