10 ms·
> which then makes it very difficult for anyone else to figure out what is going on Or we can learn to read them. Just treat types like a first class value. Yo
by mixedCase 6y ago
> which then makes it very difficult for anyone else to figure out what is going on
Or we can learn to read them. Just treat types like a first class value. You either assign names to types like you do to values, or you can assign a name to a function that returns a type, this being generics.
- systemvoltage 6y ago> or we can learn to read them That's an awful way to think about hard to read code. I could produce the most unreadable one liners you've ever seen in your life. We should condemn that and not blame it on others to "learn how to read".
- ragebol 6y agoYou write code for an audience. In that audience, sit yourself in your current state, yourself a year+ from now, your colleagues (you know their level) and the compiler. With bad luck, your current self i a state pulling your hair out to debug. Think about the audience when you code.
- gowld 6y agoI assume you only program in readable languages like COBOL and AppleScript.
- mixedCase 6y ago> That's an awful way to think about hard to read code Most of the time I hear about "hard to read code" is "pattern I don't currently have a mental model for". We didn't move on from COBOL by letting that be a deterrant.
- systemvoltage 6y agoFair, I've actually seen both types of situations. I only complain after having some domain knowledge of the project and the language/tools. After sufficient understanding, I will make sure that the code that gets merged into master is highly readable. Simple > complicated. Always. Don't be ashamed to write simple code.
- michaelcampbell 6y agoAh, blub. It will never leave us.