… who’d have guessed so many other people love Struct too?
-
-
Replying to @steveklabnik
@steveklabnik There are so many Struct anti-patterns too. I loath "class Human < Struct.new(:toes, :fingers)"1 reply 0 retweets 0 likes -
Replying to @steveklabnik
@steveklabnik It's unnecessary cleverness that easily confuses things. Structs are only for simple values.3 replies 0 retweets 0 likes -
Replying to @steveklabnik
@steveklabnik Your Birthday example is a perfect example of how I think Struct should be used.4 replies 1 retweet 0 likes -
Replying to @evanphx
@evanphx@steveklabnik birthday example? what birthday example? I sure love me some nice birthday.1 reply 0 retweets 0 likes -
Replying to @konstantinhaase
@konstantinhaase@evanphx http://blog.steveklabnik.com/posts/2012-09-01-random-ruby-tricks--struct-new …1 reply 1 retweet 1 like -
Replying to @steveklabnik
@steveklabnik@evanphx cool. btw, your Point example is missing a .new: Point(0,0) => Point.new(0,0)1 reply 0 retweets 0 likes
@konstantinhaase lolz ty
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.