3 ms·
One argument I might put on the cons side of AOT type validation for configs is that there will always be some invalid inputs that can't be statically checked (
by usrusr 3y ago
One argument I might put on the cons side of AOT type validation for configs is that there will always be some invalid inputs that can't be statically checked (e.g. port number already taken), and not failing simple type errors before runtime helps keeping in mind and view whatever feedback channel exists for the runtime failure. I wouldn't consider that a winning argument, but it's not entirely without merit.
- srcreigh 3y agoduplicate port number can be checked in the type system if you’re using racket, at least
- usrusr 3y agoDuplicate port number in the config might be checked ahead of time, but port number already taken by something unrelated in the environment deployed to can't. I'm sure that the scope of pkl isn't intended to setting up clean slate containers and nothing else, ever.
- avianlyric 3y agoThat’s not a reason for giving up on all config validation before runtime. Just because we can’t solve a problem in every possible situation doesn’t mean shouldn’t solve the problem for any situation.