Discussion JASS Standards

Weep

Godspeed to the sound of the pounding
Reaction score
401
What do you mean?

There was the JESP a while back, but it seems to have fallen out of favor.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Hmm. So no currently used standards, then.

Excellent.
 

Viikuna

No Marlo no game.
Reaction score
265
There are standards yes, but not anything common for all.

Wc3c.net for example has very strict standards of coding, when guys here in TheHelper have their own way to do stuff.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, and that's kinda why I don't really like Wc3C, since they seems to be very conservative, and doesn't really want to approach anything from more than one angle...

And that is probably also why not that much gets approved there. And also that is the worst way of "behaving", as it tends to talk against inventing new stuff, that might be done in a better way :(

But I'd still say that JNGP is (Or at least should be) in most cases :D
 

Trollvottel

never aging title
Reaction score
262
well i thing there are SOME conventions used in jass/vjass.
like starting method names with small letters and beginning each new word with a capital letter.
or writing globals constants with big letters and _ dividing the words.
or starting struct names with a capital letter.
there are so much things to add to this list...
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Yes, there are many forms the (v)JASS standards take. Many are related to standards in all programming languages, and many are related to the syntax of the language itself.

Trollvottel named a few such as camelCase for method names (or CamelCase for function names).

Others include camelCase for local variables, CamelCase for global variables, and CamelCase for struct/library/scope names.

Textmacros are not very clean looking, and so few people want to use a system that uses textmacros for the interface.

Indentation/Tab length is a standard 4 spaces, with block starters/enders being on the same line as others in the parent block.

If an object is not to be used outside the current scope, it should be [ljass]private[/ljass]. If it should be used outside the current scope, it can be either [ljass]public[/ljass] or have no label, depending on how likely the name is to be used. This is largely because not too many people look favorably on the use of the "_" symbol to separate the scope name and the object. Many prefer the "." symbol, or dislike the use of long names for objects.

There is a lot of leniency, but as long as the interface is 'clean', it doesn't matter TOO much what the code on the inside looks like.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
I just need basic, plain JASS standards, so I know how the code should look. :p

I think I got all I needed. Thanks. :thup:
 

Trollvottel

never aging title
Reaction score
262
look at some of the newer approved systems and you might find out quite much about standards (at TH).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top