Re:Iced: A cross-platform GUI library for Rust, inspired by Elm
by patwoz on Friday August 27, 2021 @12:30PM
(#28329794)
Can someone explain the difference of redux to elm? I don’t see a difference on the first look. I‘m a React/Redux Developer.
[ Parent
| on HN ]
Re:Iced: A cross-platform GUI library for Rust, inspired by Elm
by sli on Friday August 27, 2021 @12:46PM
(#28330026)
Quickly? Redux is a state container that supports Flux actions and Elm is a language with a companion architecture that's recommended. The comparison would be between Elm and Javascript/Typescript+React+Redux, as it provides the ability to implement those featuresets out of the box, including Messages, which is the TEA answer to Redux and Flux actions (more or less).
Personally, I find working with Elm's state management features is like heaven compared to dealing with Redux+Typescript's intensely noisy types.
Re:Iced: A cross-platform GUI library for Rust, inspired by Elm
by scns on Friday August 27, 2021 @01:43PM
(#28330811)
TEA was the inspiration for Flux/Redux IIRC.
Re:Iced: A cross-platform GUI library for Rust, inspired by Elm
by seanwilson on Friday August 27, 2021 @01:16PM
(#28330442)
> compared to dealing with Redux+Typescript's intensely noisy types.
Anybody have any experience on how this compares to ReasonML + React?
Re:Iced: A cross-platform GUI library for Rust, inspired by Elm
by mejutoco on Friday August 27, 2021 @02:35PM
(#28331445)
Redux is to React what the 'update' function is to Elm architecture (first code example in the following link)
Answering your question, the difference is Elm has a more expressive type system than javascript, and will catch a lot of errors for you, with excellent error reporting from the compiler.
The layout of the code becomes less important, because the compiler will catch most errors (actually recommended in elm guides not to split in too many files until overwhelmingly necessary)
Re:Iced: A cross-platform GUI library for Rust, inspired by Elm
by tmountain on Friday August 27, 2021 @02:10PM
(#28331148)
They're really similar. Elm works hard to abstract away the JavaScript universe and create really clearly defined borders regarding being inisde Elm land or outside of Elm land. Specifically, interacting with external libs, etc. involves retrofitting them to work via a port, which lets side effecty stuff come in as a standard message without having to deviate from the basic design. Redux may do something similar (I forget), but the gist of what I'm saying is that Elm works really hard to adhere to its core primitives to limit cognitive overhead for most tasks.