3 ms·
Back in the early days of Pascal programming for both DOS and Mac, it was common to put a 'the' prefix on just about every variable. I guess it was supposed to
by Stratoscope 10y ago
Back in the early days of Pascal programming for both DOS and Mac, it was common to put a 'the' prefix on just about every variable. I guess it was supposed to be more "English-like". You'd have variables like this:
theWindow
theUser
theFile
theLineCount
I hated it! I never did find out why people wanted to put in such a useless noise word in every single variable name, but I decided to never do it again.
Make every word count.
- jejones3141 10y agoThat would almost tempt me in Algol 68, where, like FORTRAN, space isn't significant, and where members of structures are referred to as foo OF bar rather than bar.foo but as you say, in code "the" is a noise word, so I'd resist. :)
- ams6110 10y ago"my" was another often-seen useless prefix of that era
- flukus 10y agoIt still has it's uses as a class name prefix. MyFoo extends GenericFoo.
- louthy 10y agoIndeed, it is horrific. As is Hungarian notation. Anything where the type or locality ('m_foo', 'g_var') has infiltrated the name of the variable says to me that the variable is named badly.