IssueRaiser

It's interesting to switch your example to "Hash Table" instead of "Array".

It's interesting to switch your example to "Hash Table" instead of "Array". C is the language I'm most familiar with, and lacks one as part of the core language. So in fact, C essentially does say "Oh, just use the (associative) array pattern here. Start by rolling your own..." Does this mean that a design pattern is not an absolute, but relative to a language? Or does it mean that there is no clear distinction between syntax and pattern? I don't think that being one excludes being the other. We build arrays into the language so that they are easy to recognize and the pattern becomes a primitive tool. If you have to keep rolling your own, you'll never get past that. It will never become primitive, and you will stagnate. That is what those who object to design patterns object to: by thinking of them as elements of design -- the work of day-to-day programmers -- we won't provide linguistic abstractions that allow them to become primitive tools. Rather than fearing that naming a concept will cause stagnation, I think the opposite: the failure to have a "shorthand" for a commonly used feature means it will continually be reinvented. Once named, the concept can be pushed down to syntax while remaining a design pattern. The surprise (to me) is that the gulf between being part of the language and being an easy to add library is so great. Why is there no standard hash table that gets used in C? Why is there such a difference between core and non-core? I don't know what it is, but don't think it's for lack of syntax.

Posted by nkurz on Feb 2, 2015, 5:13 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.8,000 issues0 comments

reliability (Other)

It's interesting to switch your example to "Hash Table" instead of "Array".

nkurzFeb 2, 2015, 5:13 AM

It's interesting to switch your example to "Hash Table" instead of "Array". C is the language I'm most familiar with, and lacks one as part of the core language. So in fact, C essentially does say "Oh, just use the (associative) array pattern here. Start by rolling your own..." Does this mean that a design pattern is not an absolute, but relative to a language? Or does it mean that there is no clear distinction between syntax and pattern? I don't think that being one excludes being the other. We build arrays into the language so that they are easy to recognize and the pattern becomes a primitive tool. If you have to keep rolling your own, you'll never get past that. It will never become primitive, and you will stagnate. That is what those who object to design patterns object to: by thinking of them as elements of design -- the work of day-to-day programmers -- we won't provide linguistic abstractions that allow them to become primitive tools. Rather than fearing that naming a concept will cause stagnation, I think the opposite: the failure to have a "shorthand" for a commonly used feature means it will continually be reinvented. Once named, the concept can be pushed down to syntax while remaining a design pattern. The surprise (to me) is that the gulf between being part of the language and being an easy to add library is so great. Why is there no standard hash table that gets used in C? Why is there such a difference between core and non-core? I don't know what it is, but don't think it's for lack of syntax.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue