Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grandM

macrumors 68000
Original poster
Oct 14, 2013
1,567
329
Hi guys

I was thinking back of the playing card game of Hagerty in the Stanford course. In Swift I seldom see lazy instantiation turning up. I remember thad that game had a deck. This deck had cards. Were these cards lazy instantiated?

In swift would you also use the lazy keyword? Would you use a factory to produce these cards?

Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.