News for hackers. Stuff that matters.
Re:How Discord achieves native iOS performance with React Na... by wdb on Friday November 08, 2019 @04:58AM (#21481033)
Sounds like React Native causes more work then necessary. Business logic can be easily shared between different platforms, Android, macOS, Windows and iOS. Always the most time is spend to make the app behave right for each platform, so that’s only bit which differs. I am happily writing apps in Swift for Android and iOS
Re:How Discord achieves native iOS performance with React Na... by blunte on Friday November 08, 2019 @05:23AM (#21481102)
Watching some videos illustrating writing iOS React Native apps using Clojurescript, with REPL changes updating app display in real time (well, "live") is what makes me interested in RN. Were it not for that, I don't see why Swift is such a bad thing. I know that maintaining two separate code bases for iOS and Android is theoretically bad, but I imagine if the apps are architected well it shouldn't be such an issue.
Re:How Discord achieves native iOS performance with React Na... by rsynnott on Friday November 08, 2019 @05:28AM (#21481118)
> I know that maintaining two separate code bases for iOS and Android is theoretically bad

I'm not sure _why_ this should be theoretically bad. It depends what you're going for, of course, but cross-platform GUIs are typically... not good. There's a lot to be said for separate GUIs with shared business logic IMO.

Re:How Discord achieves native iOS performance with React Na... by ericlewis on Friday November 08, 2019 @08:26AM (#21481941)
It’s theoretically bad because you’re theoretically wasting your time and resources. In practice that doesn’t have to be true. But I merged two teams together via react-native in hopes to make them more productive and it absolutely worked.

Android is no longer a laggard with features, which was also a big goal of ours.

That said, if I were to go back and time and know how much of my own time would be spent fixing bugs in react-native just to keep the team productive, I might have made a different choice.

Edit: should also be known that I’m no longer helping with fixing RN bugs, and the team still messages me on occasion to ask questions or for help to fix things. This was absolutely not the position I was trying to leave that team in.

Edit edit: my leaving the team wasn’t within my control and management didn’t realize the level of work to Keep the Lights On nor did the particularly care.

Re:How Discord achieves native iOS performance with React Na... by Naomarik on Friday November 08, 2019 @08:14AM (#21481874)
I'm using Clojurescript with react native via re-natal and it's a decent experience because of Clojurescript. If Clojurescript was not an option I'd probably just use flutter instead.
Re:How Discord achieves native iOS performance with React Na... by egwor on Friday November 08, 2019 @09:08AM (#21482228)
Except that you do need to know two technologies. Part of architecting it right is also using the technologies correctly and that's extra knowledge + time + skill.
Re:How Discord achieves native iOS performance with React Na... by mattacular on Friday November 08, 2019 @05:14AM (#21481072)
The Swift for Android and iOS makes sense but how do you "easily" share same business logic between those other different platforms?
Re:How Discord achieves native iOS performance with React Na... by wdb on Friday November 08, 2019 @06:28AM (#21481375)
For that I am using the compiler which allows C#, Go, Swift code to mixed. It’s really great. So with some work you could use existing C# code even in your mobile apps. I am liking it so far :)
Re:How Discord achieves native iOS performance with React Na... by mikecsh on Friday November 08, 2019 @08:55AM (#21482130)
Which compiler is this?
Re:How Discord achieves native iOS performance with React Na... by Ingon on Friday November 08, 2019 @11:22AM (#21483673)
I think this is a reference to RemObjects Elements
Re:How Discord achieves native iOS performance with React Na... by rsynnott on Friday November 08, 2019 @05:26AM (#21481115)
Swift will also work on Windows, and of course on MacOS (and Linux). If you prefer, you could use Kotlin in a similar role via kotlin-native.
Re:How Discord achieves native iOS performance with React Na... by eropple on Friday November 08, 2019 @10:55AM (#21483369)
But Swift won't work on Android. And Kotlin Native is severely compromised.

The lingua franca options are effectively Xamarin, Flutter, and React Native. Xamarin's dev experience sucks and Flutter's perf isn't much different from React Native with a way less mature ecosystem.

There are people who should write platform-native mobile apps. For everybody else, React Native is fine. And, for my money, TypeScript is the most right programming language easily available on major platforms today, so that makes this one pretty self-evident to me.

Re:How Discord achieves native iOS performance with React Na... by rrdharan on Friday November 08, 2019 @11:00AM (#21483455)
Doesn’t QT belong on your list? Or am I missing something?
Re:How Discord achieves native iOS performance with React Na... by eropple on Saturday November 09, 2019 @01:14PM (#21493143)
I'm not writing mobile applications in C++.
Re:How Discord achieves native iOS performance with React Na... by MarkMc on Saturday November 09, 2019 @02:21AM (#21490150)
Genuinely curious: In what way is Kotlin Native severely compromised?
Re:How Discord achieves native iOS performance with React Na... by eropple on Saturday November 09, 2019 @01:16PM (#21493156)
The reason, to me, to use Kotlin is to leverage the JVM without having to write Java or Scala. When you don't have the decades of quality JVM libraries there, I don't see much value in Kotlin, outside of high-performance applications that I don't need to write on mobile. Instead I can write TypeScript--and while I don't hate Kotlin, I quite like TypeScript--without having to constantly screw with marshaling between the native/UI layer and Kotlin Native.