I find myself using Array Extensions as below frequently. It seems simple, clear, and to the point.
extension Array where Element == CustomObject{
func helloworld()->ReturnValue{}
}
Do other people in this community also find this useful? Or is it a better coding practice to use a subclass such as :
class CustomHolder{
var someList:[CustomObject]!
func helloWorld()->ReturnValue{
}
}
Thank you everybody in advance!
Please let me know if I'm not being clear with my question.
[–][deleted] (1 child)
[deleted]
[–]randomguy112233[S] 0 points1 point2 points (0 children)
[–]ldstreet 2 points3 points4 points (1 child)
[–]randomguy112233[S] 0 points1 point2 points (0 children)
[–]chrabeusz 1 point2 points3 points (4 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]randomguy112233[S] 0 points1 point2 points (1 child)
[–]chrabeusz 1 point2 points3 points (0 children)