5 ms·
Typescript people pretend to love type system and its benefits while ignoring languages like this which has type designed from ground up. If Elm had some ways t
by Existenceblinks 4y ago
Typescript people pretend to love type system and its benefits while ignoring languages like this which has type designed from ground up. If Elm had some ways to easily preserve object reference (something like `mut` something or reference type like in Webassembly), that would unlock a lot of js interop stories rather than just `port`.
- GiorgioG 4y agoNo, we ignore Elm because it has a bus-factor of one.
- lucamug 4y agoUsing Elm in production for years. Still waiting for the bus :-)
- hobofan 4y agoThe way it is maintained it more or less has a bus factor of 0.
- bananarchist 4y agoThis is a rather bizarre claim. Is the risk of loss truly so terrifying as to always avoid joy?
- GiorgioG 4y agoIf you're tinkering, joy > risk. If you're building a business/product then yes, it does matter.
- martpie 4y agoTypeScript has always been very explicit it's trading soundness for productivity. And don't assume "typescript people" only do TypeScript. I've introduce TypeScript to multiple teams already, and if the transitions were not frictionless, they were always extremely fruitful in the end. And I can guarantee using a more sound (and more complex) type system like Elm or Rust would have never succeeded, because people using high-level languages don't want to know about low-level CPU/memory details, they just need to build things and have something that is "fast-enough" (and safe-enough, if possible).
- cardanome 4y ago> And I can guarantee using a more sound (and more complex) type system like Elm or Rust would have never succeeded Both Rust and Elm have a much simpler type system than TS. Well, for Rust it can maybe be argued to have its complexities but Elm is dead simple. In fact the most common criticism of Elm is that it it lacks more complex features that people from the Haskell world are used to. Allowing for the gradual typing of a dynamic language like JS is extremely challenging requiring stuff like structural typing which is not at all common in most mainstream programming languages. I don't thing there are many mainstream languages that have a more complex type system. The value TS offers is ease of gradual adoption and access to the huge JS-ecosystem and for that you absolutely pay a price in complexity. It is absolutely trivial to design a language with a much simpler, sound type system that offers higher productivity and a smaller learning curve than TS but that wouldn't have much value for most people as the access to the JS stuff and gradual adoption.
- horsawlarway 4y ago> I don't thing there are many mainstream languages that have a more complex type system. I both agree and disagree with this. I think if you're coming from a statically typed language, and you're familiar with features in those language - Typescript is a very complex type system, where it can often be difficult or frustrating to express common paradigms. That said... if you're coming from something like Ruby/JS, typescript has a pretty simple path to convert your existing code, and it doesn't get too fussy about letting you punt on the problem for a bit (start with very loose rules and lots of "any" - get more strict over time).
- cardanome 4y agoAgreed but that does not contradict anything I wrote. There is a confusion on terminology though. You are arguing about ease of use which is a different measure from complexity. That might have caused a misunderstanding. Complexity is an objective measure while ease of use is subjective and based on your previous experience. For example the language Brainfuck is very simple (conceptually) but very difficult to use for most humans. TS is objectively complex but also easier to use for Ruby/JS devs as you wrote.
- dvdhnt 4y agoPersonally, I just don't enjoy writing Elm and much prefer TypeScript. For me, TS is great because of the community, tooling, and its self-documenting nature.
- Existenceblinks 4y agoIt's great for keeping status quo, anything is great if it's already there. Community and tooling is the result of that, things that exist for a while. But if we want to move forward, advancing tech, TS is just ok-ish (at some point it's not though)
- nsonha 4y agoWhy does elm need to exist? If I want the "ground up type system", I'd go for haskell, something more user friendly or UI oriented then F# with fable. A functional language just for UI is too niche, waste of brain space.
- Existenceblinks 4y agoBecause value / cost is lower, it's much simpler, yet powerful. However, it's unfortunate that its social cost is higher.
- TheMatten 4y agoWell, you can't easily use Haskell on web, at least not yet. But there's Purescript, which comes with both anonymous records and Haskell2010-ish type system with some extensions and may be an interesting choice.