Remix.run Logo
▲ psychoslave 4 hours ago

That's why I'm now considering what are the ratio for each language in term of exposing the business logic nub that human can grab (mostly) correctly vs all the clutter that is here mainly to bring additional type safety and please the compiler in some way.

One approach that Ruby took for type introduction was to put that in a different file. That comes to my mind.

Typescript brings some niceties, but also some boilerplate all other the place. Combined with something like Effect, Zod, and the like and line count explode. Not sure OCAML or Haskell would provide more compactness for equivalent safety.

▲duesabati 3 hours ago | parent [-]

What you refer to as "clutter" is what actually documents the code without the need of comments if done correctly i.e. naming things properly i.e. ubiquitous language. Before rushing to throw away things you don't know, learn about them.

▲psychoslave an hour ago | parent [-]

There is no "document with documentation", be it comments or as companion side resource with an obvious cross-reference.

There was no mention here on rushing to anything. Verbosity is not always bringing actual non-duplicating information. And even when the explicit way is taken, it can be put aside from human main analysis observation point. Actually even Typscript allow to organize type information by using .d.ts files for declaration files that contain only type information, while implementation files use the .ts extension.

Then there is the tradeoff between grepable explicit type and spare implementation with as much type inference as possible.