Hacker News new | ask | show | jobs
by jcelerier 2134 days ago
> Sure, you don't have to go out of your way to challenge your type system, but it still means that you're a single typo away from sending your compiler and yourself on a wild goose chase.

the alternative would be writing bash or python or ... scripts to generate the code, and for those :

- you likely don't have any error message at all (ugh)

- they won't have knowledge of the type system of the language you're operating.

Seriously, everyone complains about pages and pages of template errors, but if you use any decent IDE it's a two-click process to go to the part of your code where things fail. Errors will be split, then (at least with GCC & clang) you just start at the bottom of the error which is the place in your code where things go wrong 99% of the time - and if not, rarely if ever more than a couple steps above that. see e.g. : https://streamable.com/0k6lvl

1 comments

There are mainstream languages with decidable static type systems. They compile quickly and give obvious short error messages.
names ! we want names !

also, decidable likely implies total - and my experience with total languages is that more often than not you need to add another turing-complete "scripting" layer on top of it (for instance, a TC language to generate expressions in the total language) as it's so cumbersome to write otherwise when you have actually business rules and not simple math examples