Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I have a hard time imagining a clean codebase in a language without some form of polymorphism, first class functions, and algebraic data types

You don't have any definition of 'clean', so maybe you mean something precise or maybe you don't, but I have seen clean codebases in all kinds of languages - C, C++, Go, Java. The language doesn't dictate whether your code is clean or not, the programmer does.



Bad programmers will write bad code in any language, but in some languages even the best programmers will struggle to write good code. E.g. I've found even the best C tends to look quite cluttered, because the lack of first-class functions forces the programmer to thread state through "by hand", and the lack of polymorphism means the programmer can't clearly separate the what from the how but has to interleave the two. (Indeed I would say bad C can sometimes look superficially cleaner: things like using global variables for state remove some of the clutter, but ultimately the cure is worse than the disease)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: