Earlier quoted context omitted.
isn't Storyboard based on components (parts) first (atomic design)? Elm is the opposite, it's focused on the whole which you then use as the basis for parts at actual design time (thinking about layout and hierarchy). So in a way Elm is about form following function (creating visuals from existing functionality), while most of the other environments are focused on function following form instead (creating functionali…
You can perfectly do the design-first process with Elm, I thought you were maybe accustomed to Storyboard or something like that. IMHO you can do design-first process with Elm just like with React. There is no Storyboard equivalent that I'm aware of, but I never found it useful enough but maybe it is, for toolkit/library designers. I have found that I work differently depending on environment. I do model/types/functi…
IBM releases Elm-powered app
111–120 of 199 posts
Re: IBM releases Elm-powered app
#112I don't understand why this is noteworthy. I think maybe this is when you decide 'maybe our language has failed'. Or at least admit it's a toy language that hasn't been properly engineered to be effectively used commercially. When it's a 'worth mentioning' when a single app has been written in it by some dying company. I mean, imagine if we had a headline on the frontpage of HN for every app written in C or C++ or Ja…
Just because you don’t use functional languages for serious commercial work and don’t personally know anybody who does, doesn’t mean the rest of us don’t too. Plenty of us use functional languages for serious commercial work, now or in the past. I’ve persobally used ClonureScript and know plenty of people who use Clojure. I know people who use Haskell. Jane Street famously use OCaml. Lots of people use Scala. Clearly an IBM team uses Elm. I mean, the article itself is a counter example to your statement.
Re: IBM releases Elm-powered app
#113I don't understand why this is noteworthy. I think maybe this is when you decide 'maybe our language has failed'. Or at least admit it's a toy language that hasn't been properly engineered to be effectively used commercially. When it's a 'worth mentioning' when a single app has been written in it by some dying company. I mean, imagine if we had a headline on the frontpage of HN for every app written in C or C++ or Ja…
> Functional languages are great toys but nobody uses them to get work done, almost without exception. Just because you don’t use functional languages for serious commercial work and don’t personally know anybody who does, doesn’t mean the rest of us don’t too. Plenty of us use functional languages for serious commercial work, now or in the past. I’ve persobally used ClonureScript and know plenty of people who use Cl…
Re: IBM releases Elm-powered app
#114Earlier quoted context omitted.
You can perfectly do the design-first process with Elm, I thought you were maybe accustomed to Storyboard or something like that. IMHO you can do design-first process with Elm just like with React. There is no Storyboard equivalent that I'm aware of, but I never found it useful enough but maybe it is, for toolkit/library designers. I have found that I work differently depending on environment. I do model/types/functi…
I'm don't mean to nitpick, but did you mean storybook instead of storyboard? That's the only project that I've found which sounds like what you're talking about https://github.com/storybooks/storybook
Re: IBM releases Elm-powered app
#115Elm is fascinating since it shows that with the right architecture functional programming for GUI is possible without hatches like monads or hiding state in closures or green thread stacks. Another things is that in Elm the state of the whole application is very visible. Typically just by looking at data structures and message types one gets how things work. The code just fills details.
I understand what you are saying, but - the whole point of abstractions is to "hide state". For example, what is nicer to write/read? Pseudocode - // Stateful state = {buttonClicked: false} render() { if(!state.buttonClicked) { return button({text: "Click Me", onClick: {state.buttonClicked=true}}) } else { return text("Thanks!") } } vs. // Implicit state render() { yield button({text: "Click Me", onClick}) yield text…
Besides, your example get much of its gains by hiding the behavior of that 'if' statement than by hiding that 'buttonClicked' stores the button data.
Re: IBM releases Elm-powered app
#116Earlier quoted context omitted.
Most of the people want freedom and not some North Korean style crap. The example I gave was explicitly displaying how it is possible to use something from JS on a type safe way. Not sure how could you hang yourself with that. I guess you are just very creative.
> North Korean style crap This confirms my belief that most criticisms of Elm are emotional responses, not rational ones. Allowing arbitrary JS functions to be called from wherever would indeed break everything. Want to use `Math.random()`? Whoops! There goes referential transparency. Want to use `document.querySelector()`? Hello runtime errors my old friend. Want to use `function(x) { return x / 0; }`? Yeah, have fu…
Everyone’s relationship to their tools of choice has an emotional component. Check out this talk, you might find it interesting:
“The Pervert’s Guide To Programming Languages” https://youtu.be/mZyvIHYn2zk
Re: IBM releases Elm-powered app
#117Re: IBM releases Elm-powered app
#118Earlier quoted context omitted.
> North Korean style crap This confirms my belief that most criticisms of Elm are emotional responses, not rational ones. Allowing arbitrary JS functions to be called from wherever would indeed break everything. Want to use `Math.random()`? Whoops! There goes referential transparency. Want to use `document.querySelector()`? Hello runtime errors my old friend. Want to use `function(x) { return x / 0; }`? Yeah, have fu…
I literally have never experienced a bug because of the existence of Math.random(). I don’t think I’ve ever used it outside of a coding interview. Similarly, I don’t spend time debugging runtime errors caused by document.querySelector()? If I do it’s usually only once when I write the initial query. I don’t understand your last argument: why would I divide by 0? Everyone’s relationship to their tools of choice has an…
Re: IBM releases Elm-powered app
#119In a comment below the main post they say that the app they wrote is approximately 45,000 lines of code over 170 Elm files. That's one of the largest (and apparently most useful) Elm apps in the wild that I've heard of, and the fact that it exists and they had an overall good experience with it inspires me even more to try to learn and use Elm.
Re: IBM releases Elm-powered app
#120Earlier quoted context omitted.
Scalatags is not a VDOM implementation, though, and the Elm architecture (one giant state machine) is very different to what you'd typically see in a Scala.js application. A closer analog, in my opinion, would be ClojureScript + Reagent, but even that doesn't feature Elm's focus around immutability.
ScalaTags is indeed not relevant here, but Scala.js has its fair share of reactive UI libraries such as my own Laminar https://github.com/raquo/Laminar