News for hackers. Stuff that matters.

Chadtech_Real

Re:Asset minification with Elm (2018) on Tuesday August 27, 2019 @06:29PM (#20815088)
I havent actually written any ReasonML, but I once had to review some my former coworker wrote. Thats the extent of my ReasonML experience, so I dont have much of an opinion. However, I was surprised that the ReasonML code I looked at relied on impure functions. I like pure functions so that scares me off a bit from the OCaml as a whole.

Regarding static html/css, I havent done that either, so I dont know about it.

Re:Asset minification with Elm (2018) on Tuesday August 27, 2019 @06:21PM (#20815025)
Good. I have written drag and drop functionality in Elm a few times. I have a clear enough idea on how that code looks that if I had to write a drag and drop today, I think I could crank it out quickly.

You call it stateful tho. I dont know that drag and drop needs to be all that stateful. For drag and drop, the information your model needs is whether you have mouse-down-ed on something, the coordinates on the html element you mouse-down-ed, and the coordinates the mouse's current location is. 2 pairs of coordinates and a maybe type? Not too bad. I guess there is the code too, but at least the data is just few values, and not a complex and nested data structure.

On my team at work, we avoid state. Complex nested state is a big code smell for us.

Re:Asset minification with Elm (2018) on Tuesday August 27, 2019 @04:33PM (#20814153)
They are pretty different. They have similar syntax, and their type systems are similarly strong, but beyond that they are pretty different.

Haskell has a huge syntax and a ton of language features. It has a big ecosystem. Haskell is very mathy. Elm is the opposite in each of those regards.

Re:Asset minification with Elm (2018) on Tuesday August 27, 2019 @04:28PM (#20814109)
I dont even think upgrading to 0.19. If you have 0.18 code that works, why upgrade? I think NoRedInk has some very old versions of Elm still in production, like 0.16 or something.
Re:Asset minification with Elm (2018) on Tuesday August 27, 2019 @03:20PM (#20813466)
I have been writing Elm for 5 years now. I work at Humio, where our front end is 100k lines of Elm code.

What would you like to know? I love Elm. I'm absolutely hooked. I don't want to go back to doing Frontend work in JS, and I hope one day there can be an Elm-like experience for backend development as well.

Just off the top of my head a few bits of what I like about Elm: - You can actually write code, have no errors, and then move on, and never return to the project again. When I was doing JS, everyone I knew just took it for granted that you would be maintaining everything you ever wrote for the rest of your career. Not with Elm! You can actually finish projects and never return to them. - Its a simple and small language that is designed to interact with human beings. The compiler really talks to you instead of spitting out error codes or spaghetti. Apis and variables have human readable names instead of mathy terms of symbols. - For everything theres one way of doing things and the one way is usually really good. This strong consensus orientation of the Elm community means everyone is speaking the same language about every problem.

Gotta go, bye.