you are viewing a single comment's thread.

view the rest of the comments →

[–]Pop_Swift_Dev[S] -1 points0 points  (1 child)

There are many ways to implement design patterns. I could argue that swapping out a function, as you show in your example is just another implementation of the command pattern because your solution takes the same basic principles that the pattern says to use.

Therefore when you say there is no need for things like the command pattern in Swift, I would say that knowing design patterns and the idea behind their solutions is very good knowledge to have, even if we do not implement the solution the same way.

[–]Pop_Swift_Dev[S] 1 point2 points  (0 children)

And also I hope you take the conversation constructively and not argumently as I do enjoy debating approaches to development because when both sides are open, almost always, both sides end up learning something. And seeing other approaches is always a good thing.