4 ms·
> Can you suggest a better solution? Yeah. Mind your docs. Languages and APIs designed like this and get you crippled tools that simply do not allow you to e
by h2odragon 7y ago
> Can you suggest a better solution?
Yeah. Mind your docs.
Languages and APIs designed like this and get you crippled tools that simply do not allow you to express about half the shit you're gonna need to do. That generates another layer of indirection, abstractions, and workarounds to break through the "we think for you" for when what "they thought for you" wasn't what you was actually thunking.
There's a place for languages that don't allow you to shoot yourself in the foot or other member of your choice, I'm sure. I don't want to go there.
- bitwize 7y agoThe idea is to use the type system to help you check your work. If programmers were anywhere near diligent about minding the docs, static typing would be far less useful than it is. Always assume the programmer hasn't had their coffee and is prone to making mistakes, and design your system to catch them as early as possible.
- jonahx 7y ago> Languages and APIs designed like this and get you crippled tools that simply do not allow you to express about half the shit you're gonna need to do. What problems would you see arising (either directly or indirectly) from the specific suggestion in the article, for example?
- kelnos 7y agoIf an API requires that I re-check the docs to remind me of something simple like whether or not the source or destination comes first, the API is bad. This isn't about removing flexibility, it's about helping people to avoid making easy mistakes that could be prevented.