Original Post
Other than the very common patterns like the Iterator, template,Composite patterns do you guys use patterns like the Visitor patterns and other types of patterns in practice?
Quote:Also called foreach.
Visitor patterns
Quote:Also called a class.
Composite patterns
Quote:Well, iterator...
Iterator
Quote:
Original post by Antheus
They're big in Java and somewhat in C# IT world though, so if that's your cup of tea... But I don't see many paying jobs in those sectors anymore.
Quote:Using foreach increases code size by 10x?!?!?
Original post by Antheus Quote:Also called foreach.
Visitor patterns
Simply put - patterns offer no useful abstraction as far as "design" goes. But without exception, they increase code size by 10x.
Quote:
Original post by Hodgman
If people keep implementing similar designs, it helps to attach names to these common designs so they're easier to talk about.
std::for_each(x.begin(), x.end(), visitor);Quote:
Original post by Telastyn
the composite pattern implies that the object contains multiple instances of its own type, re-exposing functionality. Linq Expression Trees, or most UI models are a good example.
Quote:
Original post by Telastyn
Sure, and then you get to implement actual behavior to make your program do something more than store ordered data. That is rather the point of design patterns, to provide a similar taxonomy to behavior as data structures have for storage.
Quote:So functionality like serialisation, or "undo" should be built into every language??
Original post by Antheus
IMHO, it makes sense to use a language which doesn't need patterns. Patterns are boiler-plate code of trying to tack an incorrect paradigm onto a language which isn't built to support it.
Quote:
Original post by Antheus
*mumble*pitchforks*mumble*....Quote:Also called foreach.
Visitor patterns
Quote:
Original post by Antheus
IMHO, it makes sense to use a language which doesn't need patterns. Patterns are boiler-plate code of trying to tack an incorrect paradigm onto a language which isn't built to support it.
Quote:
Original post by Telastyn
I agree with Hodgman, they're very useful as a communication mechanism for developers...
Quote:
Original post by jwezorek
Also the whole subject seems a little confused in that in some cases patterns seem to be sort of common themes in how algorithms interact with data structures; in other cases they seem to be the data structures themselves (e.g. the composite), and in other cases they seem to be styles of programming (e.g. wikipedia lists RAII as a design pattern. Is RAII even meaningful in languages besides C++?)
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more