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

I don't agree. I know what the previous comment said.

Modern C++ codebases that make extensive use of templates, inheritance, exceptions, type coercion, closures are considered clean by many because the code looks nice. But code like that can be a nightmare to work with, because of long compile times, spooky action at a distance, etc.

Take these two files from LLVM:

https://github.com/llvm/llvm-project/blob/main/libcxx/includ...

https://github.com/llvm/llvm-project/blob/main/libcxx/includ...

Is this "clean code"? I'm confident there will be absolutely no consensus.



It depends on the language. Some languages are just poorly designed and make it really hard to write anything that’s clean without trade-offs.




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

Search: