DEV Community

Discussion on: Experiment: Lazy Objects in Swift

Collapse
 
lobsterpants66 profile image
Chris Shepherd

Just a personal observation but I hate code examples using foo.bar. I'm sure loads of people will tell me I'm an idiot, but I just find it makes code unreadable.

In 20 years of coding I have never barred a foo.... But I guess that's just me.

Collapse
 
floschliep profile image
Florian Schliep

Thanks for the feedback, Chris! What would you have used?

I also considered using MyObject and SomeObject, as I needed two types, but Foo and Bar almost feel like a convention now. I'm not opposed to more readable names though!

Collapse
 
lobsterpants66 profile image
Chris Shepherd

Yeah Foo.Bar is a convention and lots of people seem OK with it.
I just find practical examples easier to read, something like Person.Age tends to be easier for my brain to absorb.

I'm always looking at examples thinking "when/why would I use this?", your post is perhaps a bit esoteric for a practical example but interesting none the less.