4 ms·
> Our Elm code is about as DRY as our JavaScript code Not to be flippant, but that's not saying much.
by wyager 10y ago
> Our Elm code is about as DRY as our JavaScript code
Not to be flippant, but that's not saying much.
- the_gipsy 10y agoJavaScript code is or can be extremely DRY. I have noticed this especially on a redux (inspired by Elm's architecture) codebase. The pitfall is that JavaScript is very unsafe and hard to read. I've worked with TypeScript too, and there I started to notice more repitition and boilerplate, although IMO It is very well worth the safety.
- the_duke 10y agoJavascript is dynamically typed though. And Typescript has generics or circumventing the type system with :any to enable reusability.
- the_gipsy 10y agoExactly my point, dynamically typed means writing less boilerplate. At the cost of safeness and mantainability. TypeScript's any is more for compatibility with js libs though.
- boubiyeah 10y agoYes, in a sane codebase, you (almost) never use <any>. 98% of the time, if you type <any>, you're being lazy.