Live data from Hacker News

Why I'm Not a React Native Developer

arielelkin.github.io

131–140 of 318 posts

Re: Why I'm Not a React Native Developer

#131
post #110

Earlier quoted context omitted.

>React-Native is not for every scenario What scenario isn't it for?

Dare I say games? I honestly can't think of anything else.

Definitely. Unless you have an extremely simple game, you're probably not even using the OS's built in UI framework; something like Android NDK[0] and whatever its iOS equivalent is are more suitable.

[0] https://developer.android.com/ndk/index.html

Re: Why I'm Not a React Native Developer

#132

To add to the list of javascript gripes, performance is terrible. For the web we can sort of excuse it because ok, it's running in a browser and has to be cross platform and interpreted and etc. But for a native app? No excuse to burden the user with a slow, sluggish, resource and battery draining app when a compiled native app can be snappy, quick to load, and light on the CPU.

[deleted]

Re: Why I'm Not a React Native Developer

#133
post #120

Earlier quoted context omitted.

This is definitely a specialist feeling the discomfort of not yet becoming a polyglot. Had a CTO like that once.

The author seems to express a deep enough understanding of Javascript to not warrant this dismissive critique. It's not like he's saying "Javascript sucks," he's outlining specific places where it can cause issues in development compared to the alternative.

[deleted]

Re: Why I'm Not a React Native Developer

#134

The author's rant on JS and npm deps has a point but his rant on typescript, flow, and other transpilers completely misses the mark. If JavaScript is an unsafe language and therefore anything that compiles on top of it is unsafe the same is true of Swift as it compiles to assembly/machine language which is unsafe. If you consider JavaScript some cross platform assembly language then there is no difference between the…

> If you consider JavaScript some cross platform assembly language I am so sad right now

Why? Some of the transpilers like Typescript are quite light touch.

Re: Why I'm Not a React Native Developer

#135

We have PureScript which is statically typed, pure functional language compiling to JS, can't it be adopted for React Native development somehow?

You really need to check out Elm.

It's an ML-like language with built in functional reactive framework similar to React, but built to work naturally with the language rather than requiring the FFI binding you'd need if you use Purescript.

Re: Why I'm Not a React Native Developer

#136
post #70

Earlier quoted context omitted.

TS over JS isn't best practice yet: Some of us like dynamic typing.

For what purpose is dynamic typing ever useful except "it’s faster to develop"? With a proper type system (see: Haskell, Scala) and parametrized types, you can do everything that’s reasonable in a dynamically typed language, too.

Unless you are doing Java, I would even take issue with the argument that dynamic typing is faster to develop. It's taken as obvious fact but I don't think we should just take that as face value. Getting as-you-type feedback, intellisense, and simple documentation (methods, parameters, types) is hugely productive. As well as the ability to break things and know you've caught all the breaks.

I would say that a very fast edit-run cycle is an advantage of dynamic languages -- especially if you can edit code live without restarting the application -- but that's not always the norm.

Re: Why I'm Not a React Native Developer

#137
post #84
post #70

Earlier quoted context omitted.

For what purpose is dynamic typing ever useful except "it’s faster to develop"? With a proper type system (see: Haskell, Scala) and parametrized types, you can do everything that’s reasonable in a dynamically typed language, too.

You can do them, as you noted, at a much slower pace. Type systems catch one class of bugs, and if in your experience these are not the bugs you worry about or the bugs that cause you the most pain then slowing down development is a high cost to pay.

Maybe the initial write is faster, but any refactoring strongly favors static type systems in the speed department. Even an extremely well tested dynamic code base will have a significant disadvantage for refactoring because the tools can't catch all the small details and you'll have to iterate over and over again until tests pass.

Re: Why I'm Not a React Native Developer

#138

The legal concerns are legitimate, but frankly, I am unconvinced by the criticisms of JavaScript: There are well-known, well-designed tools like ESLint, and if you like types, Flow and TypeScript, which can mitigate the issues. That's more than you can say about Java (COBOL 2.0, now with a bevy of cargo-cult OO that makes things more overly complex), or Objective-C (All the safety of C, with similar OO problems, and…

The standard defense of JavaScript is no different than the standard defense of PHP. There are good arguments but that is still the camp you're in.

Re: Why I'm Not a React Native Developer

#139

Ughhh. It's fine if you prefer statically-typed languages to dynamically-typed ones, but that's a preference, not a reason to try and say that JS is objectively terrible. Same with switch fallthrough, same with error handling, same with half his issues with JS. There are some legitimate grievances tucked in there, but the author lost me by pretending that his preferences were universal.

I have learned, from experience[†], that strongly and statically typed languages, and in general languages with rich type systems almost always result in fewer common bugs, and higher quality code. I strongly believe statically typed language are objectively superior to dynamically typed ones. Many might say that this is my subjective opinion or just a matter of personal preference, but I absolutely disagree. [†] (a…

I would much, much rather use a modern, statically typed language than a dynamic language. This includes languages like Swift, Scala, Kotlin etc and specifically excludes Java.

I wouldn't even consider dealing with a big JS codebase without either Flow or Typescript now.

Re: Why I'm Not a React Native Developer

#140

The author's rant on JS and npm deps has a point but his rant on typescript, flow, and other transpilers completely misses the mark. If JavaScript is an unsafe language and therefore anything that compiles on top of it is unsafe the same is true of Swift as it compiles to assembly/machine language which is unsafe. If you consider JavaScript some cross platform assembly language then there is no difference between the…

> If you consider JavaScript some cross platform assembly language I am so sad right now

asm.js is exactly that!
Post reply on HN