Hi All,
I think I'm confused about objective-c protocols and I'm asking here to
clarify myself.
In my mind protocols are something like interfaces of Java, C# and so on
so if I'd like to create a Factory Method I suppose it have to return a
protocol type (something like "+(Protocol*) CreateObject;") but the
compiler give to me an error about using protocol in this way.
I known Objective-C is dynamic typed language so my factory can return a
"id" type and consumer can check if the object is kind of some protocol
but I find this a "dirty" solution.
Am I misunderstanding something about "filosofy" of a dynamic typed
language? Are not useful standard design patterns in this kind of
languages (and there are others)?
Many thanks
Fabrizio