• Jonathan (unregistered)
    Comment held for moderation.
  • some guy (unregistered)

    I once worked with someone like that, but never asked. There are times when I feel I need to distinguish some central object undergoing some transformation and "the" then seems like an option. However, most times, a better name can be found or is actually not necessary after all.

  • (nodebb)

    Waay back when I was first learning tht new-fangled OO stuff, I'd encounter lines like List list - new List ; declare a shiny new List

    And it would really mess with my head. Because I was just transitioning from pe-OO languages that were case insensitive, or more accurately from languages and input systems that were all UPPERCASE.

    So a) I wasn't used to even noticing the casing of words, and b) the idea of variable named the same as their type just felt dangerously ambiguous.

    Mostly separate comment:

    All around codebases and many tutorials we see stuff like: List mylist - new List ; declare a shiny new List

    The use of "my" is common. And pretty dumb. IMO using "the" prefix is just an idiosyncratic form of "my". And both stem from a reluctance to name a limited scope variable the same as its underlying type.

    Addendum 2025-12-09 06:55: Sorry about the typos in my code samples. they were supposed to be on separate lines below the leadup sentence. And the hyphen should be an equals.

  • COBOL Dilettante (unregistered) in reply to WTFGuy

    It's often seemed to me that distinguishing the variable from the type solely by the capitalisation of the first letter is really just a highly specialised form of Hungarian notation

Leave a comment on “The Article”

Log In or post as a guest

Replying to comment #:

« Return to Article