News for hackers. Stuff that matters.
Re:React Native for OS X by dustingetz on Tuesday March 29, 2016 @11:45PM (#11386828)
TLDR is functional programming
Re:React Native for OS X by ihsw on Wednesday March 30, 2016 @12:13AM (#11386920)
And is more testable.

And is easier to bring web devs onto desktop app development.

And is faster to prototype.

And is probably a better way to develop desktop apps.

</kool-aid>

Re:React Native for OS X by pax_americana on Wednesday March 30, 2016 @12:38AM (#11387010)
I disagree. I think QML is faster to prototype (you can export an existing PSD file to qml). Also QML's anchor-based layouts >>> flexbox.
Re:React Native for OS X by zurn on Wednesday March 30, 2016 @01:54AM (#11387224)
QML is declarative so it's really more functional than React's JS with some FP conventions.
Re:React Native for OS X by daxfohl on Wednesday March 30, 2016 @03:06AM (#11387460)
This is the opposite of the case. Because QML is declarative, it forces the framework to be completely antifunctional. The view_model has to be mutable, so GUI updates are all about mutation. In React, the renderers are simply pure functions that take an immutable state input and spit out a view. No mutation, pure functionality that you can test.
Re:React Native for OS X by zurn on Wednesday March 30, 2016 @11:04AM (#11389781)
I agree in practice QML apps are typically less functional than React apps, but QML-the-language (without connecting JS functions) is functional, like CSS.
Re:React Native for OS X by daxfohl on Wednesday March 30, 2016 @03:23PM (#11392179)
You're conflating declarative and functional. It's declarative, yes. But it's not functional because there are no functions. No inputs, no outputs. It's not a programming language. It's just a config file.
Re:React Native for OS X by zurn on Thursday March 31, 2016 @01:37AM (#11395205)
I think functional and declarative are widely regarded as closely related paradigms, certainly you might call a FP program a declarative program. After all a declaration of a value as being derived from some inputs is very similar in concept to an immutable binding in a function or the concepts from functional reactive programming.

See eg https://en.wikipedia.org/wiki/Declarative_programming#Functi...

Re:React Native for OS X by daxfohl on Thursday March 31, 2016 @09:05AM (#11396826)
Yes, I'd absolutely agree that pure functions are declarative, so "functional" is a subset of "declarative".

But it's a strict subset: config files are declarative without being functional. Raw data is declarative without being functional. One could argue that imperative functions are declarative too: "This C code is the declaration of what steps to execute in what order". So the definition of declarative can be a little fuzzy around the edges, but pure functions are most certainly declarative.

Anyway, QML is most certainly declarative, however it's still not functional because there's no functions.

Re:React Native for OS X by dustingetz on Wednesday March 30, 2016 @06:06PM (#11393400)
functional programming is about immutability and higher order functions as a base kit for building abstractions, not sure what definition you are using but it's not the one that is useful when talking about React