News for hackers. Stuff that matters.
Re:Crazy, Heretical, and Awesome: The Way I Write Rails Apps by DanielStraight on Tuesday August 02, 2011 @10:18AM (#2837175)
class is a keyword.
Re:Crazy, Heretical, and Awesome: The Way I Write Rails Apps by arctangent on Tuesday August 02, 2011 @10:27AM (#2837224)
The word doesn't seem to be used by itself however - the code in the article contains "user_klass" and "log_klass", which can presumably be spelled correctly without causing an issue?
Re:Crazy, Heretical, and Awesome: The Way I Write Rails Apps by pak on Tuesday August 02, 2011 @10:49AM (#2837301)
Yeah, it can, but perhaps you develop a habit for it whenever creating variable names, so there is some visual harmony between klass, old_klass, klass_dismissed, etc. when reading the code.
Re:Crazy, Heretical, and Awesome: The Way I Write Rails Apps by damoncali on Tuesday August 02, 2011 @12:05PM (#2837601)
The k is a useful visual hint, even when not necessary.
Re:Crazy, Heretical, and Awesome: The Way I Write Rails Apps by stefan1 on Tuesday August 02, 2011 @10:19AM (#2837184)
I think perlgeek was referring to the use of user_klass and log_klass.
Re:Crazy, Heretical, and Awesome: The Way I Write Rails Apps by sugerman on Tuesday August 02, 2011 @10:20AM (#2837188)
Not in the way its used in his samples.