4 ms·
I'd still choose to use C++ or C# for cross-platform code if starting from scratch. However, I've never had to work on cross-platform apps, and have never been
by Aleman360 11y ago
I'd still choose to use C++ or C# for cross-platform code if starting from scratch.
However, I've never had to work on cross-platform apps, and have never been subjected to JavaScript professionally, so my opinion is probably worthless.
- andreashansen 11y agoXamarin would probably be the framework/tool of choice if you want C#. Other than that, most (popular) cross-platform app development frameworks I've found do use JavaScript. "Disclaimer": I'm in the middle of writing a thesis on the subject.
- mwcampbell 11y agoSince you're writing a thesis on cross-platform frameworks, have you looked at the toolchain that Google used for Inbox? They write their cross-platform non-UI code in Java. On Android, that's native. For iOS, they compile it to Objective-C using a tool they wrote called J2ObjC. For the browser app, they use GWT. The UI code is platform-specific and written in each platform's native language, i.e. Java, ObjC, and JS. They don't even try for cross-platform UI code, as Ray Cromwell explained here: https://news.ycombinator.com/item?id=8965349 https://news.ycombinator.com/item?id=8965349 This toolchain doesn't cover UWP, except indirectly via UWP's support for web apps.
- mwcampbell 11y agoSo why did you say C# and C+= are a much better fit for XAML? Because they're the languages that Microsoft officially supports? Any other reasons?
- Aleman360 11y agoOfficial support, documentation, perf (presumably), debugging, and tooling support would be my main concerns. Technically, XAML makes heavy use of C#'s events and properties (which C++\Cx adds to C++), which don't exist in plain old JavaScript. Also, both C# and C++\Cx support "await" natively, which is extremely nice for WinRT's async-heavy API's.