2 ms·
Simple vs. non-simple isn't the best way to think about code. Rather I would think about the requirements of the code. Who is going to be reading it? Maintaini
by quickthrower2 9y ago
Simple vs. non-simple isn't the best way to think about code.
Rather I would think about the requirements of the code. Who is going to be reading it? Maintaining it? Do advanced language features give some kind of advantage (runs faster?, less likely to have bugs?, more extensible?). Will new team members likely introduce bugs? Is spaghettti code better or worse than using less known patterns/language features?
Don't use advanced language features in production code for these reasons: (i) impress people or (ii) develop your CV.
Don't avoid using advanced language features just because someone wrote a blog post saying it's a bad thing to do.
In a nutshell: Think.
- fpisfun 9y agoThe whole idea of calling functional features advanced language features is a bit ridiculous I think. Yes, something like java only recently started supporting functional programming, but the paradigm has existed for a very long time.
- quickthrower2 9y agoFor me it is how those functional features are used that one needs to be careful of. I like the idea of the code that you read and think "yep that's right", rather than - OK I need half a day and a whiteboard to understand this. However the exact same piece of code might be wrong in one team, and right for another, depending on their experience and backgrounds.