Live data from Hacker News

React Native on the Universal Windows Platform

blogs.windows.com

31–40 of 54 posts

Re: React Native on the Universal Windows Platform

#32
I hate to be a naysayer because this is great work and all, but frankly, managing all these platforms is going to be a nightmare. In a traditional engine, the code for each platform is embedded at the lowest level of abstraction. That is the way it works for iOS and android at the moment, but adding new platform support via extensions will make the code harder to manage and reason about. I don't want a separate extension for OSX, Windows, and Linux. I want all the code about, say, filesystem handling to be in a single place (in neatly separated platform specific files). This applies to networking code, rendering, input, etc. I know at the bottom of the article there is hope of integrating it with the original project, but given that we are starting literally on the opposite end of the spectrum, I'm worried we will never reach this hypothetical nirvana. The original react native team needs to prioritize getting other platforms in the original codebase, and I may be mistaken, but I have not yet observed this, and so have some cause to worry.

Re: React Native on the Universal Windows Platform

#33

Earlier quoted context omitted.

Runtime heap usage.

Isn't that a performance concern though? Especially within the context of a react native implementation that environment is already going to push you way above what is achievable with C++. If we're talking a 5% reduction in the net heap usage for a react native app at the cost of substantially more error prone code, is that really a win? Hell, make it 10%? These apps still readily fit in mobile hardware, and you woul…

[deleted]

Re: React Native on the Universal Windows Platform

#35

Earlier quoted context omitted.

Why does this generate C# instead of C++?

Because it's 2016 and the notion of pinning to C++ is sort of antiquated. C++ can deliver better performance in some cases, but it also brings about a great deal more risk of security issues involving arbitrary code execution and data corruption. You have to have VERY tight performance requirements to make C++ worth the risk it entails, in my opinion. If the only thing standing between you and a code injection exploi…

I actually think C++ is a very good choice in 2016 for the following reasons.

1. C++ is the only high-level language that is vendor supported across Linux, OSX, iOS, Windows, Windows Phone, and Android. React Native is aiming for cross-platform, using a cross-platform non-proprietary language would seem to be a better match. Along the same lines, there is less risk of vendor lock-in with C++ than with C#

2. While raw performance may be less of an issue, with mobile lightweight devices where use is limited by how long the battery lasts - performance per watt becomes an issue. Having a higher performance language can result in using less power and thus a better user experience.

3. Modern C++14 is much better in terms of memory safety and ease of use. The main issue with C++14 vs C# is that C# has better libraries, not with intrinsic usability of the language.

4. The issues with code execution and data corruption are significantly mitigated by the fact that you are targeting basically a sandboxed application. In addition, it is interesting to note that most desktop Win32 applications that people use on a daily basis are probably written in C++, and they have far more permissions than a universal windows app.

Re: React Native on the Universal Windows Platform

#36

I am on the team at Microsoft that helped bring UWP to React Native. If there are questions, feel free to AMA. PS. Many thanks to the Facebook team for building a great platform in React Native and their critical help in helping us bring Windows to the platform.

did you fork the cli too? or it's the same CLI for the 3 platforms?

Re: React Native on the Universal Windows Platform

#37

Earlier quoted context omitted.

Runtime heap usage.

Isn't that a performance concern though? Especially within the context of a react native implementation that environment is already going to push you way above what is achievable with C++. If we're talking a 5% reduction in the net heap usage for a react native app at the cost of substantially more error prone code, is that really a win? Hell, make it 10%? These apps still readily fit in mobile hardware, and you woul…

Performance should be a pretty big concern for UI frameworks. Would be interesting to see some benchmarks.

Re: React Native on the Universal Windows Platform

#40

Earlier quoted context omitted.

Why does this generate C# instead of C++?

Our belief is that using C# enables many more developers to contribute to the project and build plugins versus using C++0x. That said, this is not a final decision. We are open to making a change here if community overall has a reasoned opinion backed by data for using C++ instead.

As C++ is the native language for the UWP, surely it would map more neatly to the platform?

And the well-known performance and memory advantages, however small, are critical for mobile devices. I don't think Microsoft should commit long-term to C# on mobile just as both Apple and supposedly Google are migrating to Swift as the future of their platforms, for good reason.

My two cents.

Post reply on HN