p_ptr->class vs. p_ptr->pclass

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • APWhite
    Adept
    • Jul 2007
    • 244

    p_ptr->class vs. p_ptr->pclass

    So what was the push to switch pclass to class? 'class' is a reserved word in some environments (like Visual Studio).

    pclass was still a useful word. We understood it to be player-class. I think that switch may have caused more harm than good.
    St George Chiropractor
    Angband Borg Homepage
  • d_m
    Angband Devteam member
    • Aug 2008
    • 1517

    #2
    Originally posted by APWhite
    So what was the push to switch pclass to class? 'class' is a reserved word in some environments (like Visual Studio).

    pclass was still a useful word. We understood it to be player-class. I think that switch may have caused more harm than good.
    I didn't make the change, but absent other considerations i think player->class and p_ptr->class read better. That said, if it's breaking things then I'm not necessarily against changing it back.

    Does this prevent you from building in VC++/VS? I think that BluBaron has been building recent staging in Angband in VS without hitting this problem.
    linux->xterm->screen->pmacs

    Comment

    • Blue Baron
      Adept
      • Apr 2011
      • 103

      #3
      Originally posted by d_m
      I didn't make the change, but absent other considerations i think player->class and p_ptr->class read better. That said, if it's breaking things then I'm not necessarily against changing it back.

      Does this prevent you from building in VC++/VS? I think that BluBaron has been building recent staging in Angband in VS without hitting this problem.
      I am building without any mention of this pointer. even though "class" is highlighted for me, I guess it is not treated as a keyword in C files.

      Comment

      • Derakon
        Prophet
        • Dec 2009
        • 9022

        #4
        It may also be that since it isn't a bare word it doesn't confuse the parser.

        Comment

        • fph
          Veteran
          • Apr 2009
          • 1030

          #5
          GTK uses "klass" instead of "class" to avoid conflicting with the C++ reserved word. This is funny to see, since "klass" sounds a lot like the typical KDE3 app name...
          --
          Dive fast, die young, leave a high-CHA corpse.

          Comment

          • Azerath
            Rookie
            • Jun 2011
            • 21

            #6
            klass - may come from KDE Large Ass... ;-) - just kidding no want to start OS-War ;-)

            Comment

            Working...
            😀
            😂
            🥰
            😘
            🤢
            😎
            😞
            😡
            👍
            👎