0.19 brings some breaking changes, which I came to know after reading this blog post. So all of you Elm experts, which version would you recommend for someone just starting to learn Elm?
Programming Elm (book) is updated for Elm
0.19, but all other learning resources available target version
0.18. There are available some very good learning resources for Elm
0.18, like Pragmatic Studio’s course
Building Web Apps with Elm, KnowThen’s course
Elm beyond the basics etc, but the amount of breaking changes show that learning Elm 0.18 is a wasted effort, because later one has to unlearn everything deprecated.
If you are looking to learn Elm, you can learn on either 0.18 or 0.19 without too much trouble. If you want to go through the PragStudio or KnowThen courses, get 0.18 and use it until you’re satisfied.
The things you learn in 0.18 are not going to be significantly different from 0.19. When you do upgrade, you may find some of the standard library functionality has moved around to different module so you may have to tweak your module imports, but in the course of learning you are unlikely to run into the kind of stuff the author of the post you mentioned ran into.
If you have a Project you are doing in Elm - something that is to be a going concern, I would look at using 0.19.
That’s a good suggestion. Learning 0.18 and then using 0.19 in the project at hand, so that way with a minor headache I’ll be able to migrate to 0.19.
Why not just start with Programming Elm and wait and see if you need all that other stuff? With any luck going through the book is enough to establish the right mindset - making it easier to comprehend the information contained in the official documentation which will be for 0.19 anyway.
Sorry this is slightly off-topic, but what kind of project/s will you be doing with it DG? I’m curious whether #liveview might be ‘enough’?
With regards to versions, I would generally prefer to go with latest or whichever is used in the major resource for the tech (so 0.19 imo).
One thing to consider is that elm-oracle, which is used for things like completion and type information, isn’t compatible with 0.19.
That’s a very good suggestion. I also initially thought to go that way, but in that case I won’t be able to use elm-phoenix-socket package and don’t know if it will catch up by the time I’m confident with using ELM which shouldn’t take much time.
Also as @dsissitka said,
It’s kind of a community social network with a chat system, which is of course possible using LiveView (and I’m a fan of LiveView), but I’m thinking of introducing a game at some point in future, so I want to go JS/ELM way right from the start.
Edit: Also another concern which I have with using LiveView after reading the following comment and re-watching @chrismccord’s talk is, will Phoenix+LiveView stack be as performant as a Phoenix+Js/ELM/Reason/Whatever stack?
For the programmer working in Elm, there’s not that much of a learning curve when moving to 0.18 to 0.19. Rather, there are more restrictions in 0.19, which allow the compiler to optimize your code even more than before.
For now, if you’re working on a project where you’d like to use Phoenix websockets, I’d suggest you to stick with Elm 0.18, since this package is not updated for Elm 0.19 yet (and that might take some time as well because of the new restrictions on writing Native code).
(Side note: The language is called ‘Elm’, like the tree; not ‘ELM’ as an abbreviation.)
As for using LiveView: It will only work well as long as there is a connection between the browser and the server. When this connection goes down, the app stops working. It depends on what you’re building, but there are many applications in which it is important to keep some sense of usability even if the internet connection is spotty or completely gone.
Thank you for the reply and thank you for letting me know how to write
Elm the right way! Even in this single thread I made this mistake several times.
I would probably be inclined to make the things that require an SPA in Elm (or similar) rather than the whole thing. Re LV performance, it will be interesting to see how it does, but from everything I’ve heard so far it should not be much of a issue in most cases
Not sure if this will help you, but just noticed it via @kblake