r/coffeescript • u/meltingice • May 19 '11
Singletons in Coffeescript
http://blog.meltingice.net/programming/singletons-coffeescript/
4
Upvotes
r/coffeescript • u/meltingice • May 19 '11
View all comments
2
u/tanepiper May 19 '11
Looks good. One thing I noticed, in the first example you have:
You can actually just do
Does exactly the same, and one less line
And if you want to do a default value if no name is passed