News for hackers. Stuff that matters.
Re:Strong typing, a hill I'm willing to die on by leecommamichael on Wednesday October 04, 2023 @08:20PM (#37773443)
Implicit conversions and multiple “nil” values are the root of your complaints of TypeScript. Dart improves on this, but adds OOP heft. Alas.
Re:Strong typing, a hill I'm willing to die on by tlavoie on Thursday October 05, 2023 @05:22PM (#37784455)
Would Elm be better there? It's compiling to JS, but not trying to interact with most JS except through specific interfaces.
Re:Strong typing, a hill I'm willing to die on by nyssos on Saturday October 07, 2023 @01:58AM (#37799345)
Elm is better, but I would still recommend against it.

- The dictator for life is ambiguously benevolent at best

- JS interop is deliberately heavily locked down (good) with no escape hatches (bad)

- the compiler release cycle is extremely long: there hasn't even been a minor version released since 2019.

- Elm generally picks good defaults, but often makes them impossible to opt out of. For example: it stops you from having implicit effects in your render code by making it impossible to do effectful rendering at all.

- It's optimized for making people with no functional programming experience into competent beginners, but the ceiling is low. You will eventually want to jump to something more powerful (Purescript if you need a production-ready compiler, or GHCJS-Haskell if you don't and are feeling adventurous), and when you do the process of swapping out all your libraries is not going to be trivial.

Re:Strong typing, a hill I'm willing to die on by tlavoie on Saturday October 07, 2023 @12:06PM (#37802865)
Good points, thanks for that. I'm more the old-school, server-side web guy from CGI and servlet days, who happens to like Haskell and related languages now. To that end, I haven't really been doing anything front-end at all, but would like to explore some of that.

I'm not even sure that HTMX isn't enough for my needs, so smaller and lighter is my definite preference. I suppose I should try more Elm now, and tinker with Purescript and GHCJS later. If it's all side projects, then I'm not really swapping anything unless it's a choice I'm making to explore new-to-me tech.