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

Design patterns without language support are all instances of the human compiler. Some human has to do all the work.

In a language with no functions or objects, like assembler, functions and objects are design patterns. You use the subroutine pattern and the abstract data type pattern. Yes, I was taught about abstract data types in C, instead of using a language with objects.

This doesn't mean you should forget what functions and objects are if you use a language that supports them. What it means is that the compiler will perform additional checks to ensure the function is well defined, and it will perform additional checks to that objects are well defined.

So, a more complex design pattern is something you have to care about and check for yourself in a simpler language, and something you have to care about but also something the language cares about and checks for you, in a more complex language.



I like the way you expressed this. It takes longer to say, but is less contentious than Norvig’s pithy quote “Design patterns are bug reports against your programming language.”




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

Search: