3 ms·
Yes. No I'm not missing the point: I show how, within a few lines, these 'missing features' disappear. e.g: constants, type annotations, objects as keys. Addi
by timruffles 13y ago
Yes.
No I'm not missing the point: I show how, within a few lines, these 'missing features' disappear. e.g: constants, type annotations, objects as keys.
Adding a whole language feature to save a few lines of code - not to my taste. You don't need a new language feature to express an idea if it can be trivially expressed in the language as it stands.
- nbevans 13y agoI didn't like the constants solution for nulls. Why not use a Maybe monad? I'm surprised that you didn't considering your claimed language experience. I guess I just don't agree with your fundamental position on this. That writing yet more code to workaround a bad language is in anyway a long-term solution. At some point you'll want to bring more devs onto your team and then you'll need to explain all this technical debt and hacks to them. Not good. I still believe you're missing the point of the original article you were refuting. It's not about being able to workaround something. It's about not needing to workaround flaws in the language in the first place. That's what defines a good language. Further reading for you (unordered): 1. http://www.codinghorror.com/blog/2007/05/the-best-code-is-no-code-at-all.html http://www.codinghorror.com/blog/2007/05/the-best-code-is-no... 2. "The line of code you don’t write is the line of code you never have to debug." -- Steve Jobs 3. Mythical Man Month (a book)
- timruffles 13y agoMaybe monad - like this one I wrote? http://truffles.me.uk/playing-with-es6-generators-to-make-a-maybe-in-javascript http://truffles.me.uk/playing-with-es6-generators-to-make-a-.... FYI - I'm sure you're not trying to be, but you're coming off as terribly condescending... Yes: we disagree. I write 3 lines where others see a need for new language features.