1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

DarkRP API casing conventions

Discussion in 'DarkRP Features and Code Design' started by (FPtje) Atheos, Sep 13, 2013.

  1. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    All DarkRP 2.5.0 functions use lower camel casing. The reason why I'm doing this is to clearly differentiate from Garry's code. It's simple: if you see a lower camel cased function, it's DarkRP. If it's not, it's probably GMod API.

    I reject the notion that what Garry does is standard. By that logic you should not use the Lua condition operators, you are to use "&&" and "||" instead. By the same logic you are to use C-style comments and spaces in every pair of brackets. I don't like that style. I like my own more.

    People aren't going to get confused by this, they're stupid if they are. The default Lua functions are lowercase too (rawget, setmetatable, etc.). I don't see anyone complaining that Garry's functions are not in line with those functions.
     
    German Hoeffner and Bo98 like this.
  2. German Hoeffner

    German Hoeffner Community Staff Staff Member Server Owner

    Good decision. lowerCamelCase is good to read, and even better if it's used to identify DarkRP functions.
     
  3. CrashLemon

    CrashLemon New Member

    That clarifies things on the lower cases.
     
    (FPtje) Atheos likes this.

Share This Page