Hypothesis: singleton classes on non-Classes are a bad idea (ie lang wart). /cc @bascule @brixen @johnbender
-
-
Replying to @evanphx
@evanphx what about runtime structs?@bascule@brixen@johnbender1 reply 0 retweets 0 likes -
Replying to @wycats
@wycats@evanphx@brixen@johnbender OpenStruct? trololol1 reply 0 retweets 0 likes -
Replying to @bascule
@bascule Struct and OpenStruct are both cases where you get runtime-defined methods, like object singletons@evanphx@brixen@johnbender2 replies 0 retweets 0 likes -
Replying to @wycats
@wycats@bascule@brixen@johnbender Well, no. Struct.new creates a class method methods. OpenStruct uses method_missing.1 reply 0 retweets 0 likes -
Replying to @evanphx
@evanphx it sounded like your hypothesis was about their utility in code, not implementation, right?@bascule@brixen@johnbender1 reply 0 retweets 0 likes -
Replying to @wycats
@wycats@bascule@brixen@johnbender The hypothesis is about their value as a language feature.1 reply 0 retweets 0 likes
@evanphx @wycats @brixen @johnbender what if you had a toolkit for plugging in replacement methods easily? (and syntactically distinct)
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.