HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Standardize vJass

10-29-2011, 05:08 PM#1
tooltiperror
Basically, I think that there is something very wrong with Zinc. It is counter intuitive, lacks some fun features, and is not very true to the C style family. In my opinion, it was a bit of a shit stain on the underwear of wc3c. I figured there should be a syntax to solve this.

Vexorian once proposed Boa to end this whole language war.

I think that all of this is stupid shit. The problem with Warcraft III is that we can't afford to lose our backwards compatibility. We can't afford in this age of mapping to make everybody rewrite all of their libraries... everything needs to work together. Expecting people to rewrite things is madness.

Now let's get to the idea that we want multiple languages to solve multiple problems. Whatever happens, they all need to be processed into something in common. Normal Jass is too weak. We could compile to a markup such as XML, but that might be too slow and too complex to parse. The best solution is that all custom languages should parse into something in common with enough power... vJass.

Well, we have this problem that JASSHelper is the only vJass compiler known to mankind. People use different compilers. Some features of languages are compiler dependent. For example, I may want a compiler that implements structs differently than how JASSHelper does. As long as the compilers produce the same exact thing in the end, does it make any different what the compiler is?

This is why languages are standarized. Languages like C++ have standards written, defining the grammar and certain implementation details, and then a compiler can implement this however it wants. So why not get real, and let's write a vJass standard? This is basically what we'd have to do:
  1. Write a final grammar definition of vJass that defines exactly how the language is implemented.
  2. Write a vJass standard that defines how the grammar must be implemented.
I think I will potentially be doing this. I will use JASSHelper Manual and samples of code to define the grammar, in GOLD Parser syntax. After that, perhaps we can all agree on a standard way to implement vJass?

Comments, suggestions, protests, rebuttals, help, anything?
10-30-2011, 11:56 AM#2
Vexorian
The C style family is full of overrated crap. Yes, that's right, the only reason we use {} that much is because C was very powerful, but it had less to do with the syntax it chose and more to do with its features that were so ground breaking back then. C++ appeared and instead of making a new language, it tried to build on C and then every single major language tried to copy it.

Quote:
As long as the compilers produce the same exact thing in the end, does it make any different what the compiler is?
If the compiler does the same thing, what is the point of using the compiler?

Quote:
Expecting people to rewrite things is madness.
Something that Zinc was never intended for.

Quote:
Vexorian once proposed Boa to end this whole language war.
I wanted Boa to make the language war bigger.

--
For various reasons (read: textmacros), a single grammar is not going to work at all to define vJass and GOLD blows, I can tell you because I used GOLD for years and I have in many ways confirmed it.

I've seen what having multiple compilers for a language does to the language, it is not very good. In reality Standards are never respected for more than 75%, and many times there is a good reason g++ does things different than VC++, and sometimes the standard is not realistic or lacks features that compilers are eager to add. The result is that regardless of the standard you will either need to drop support of your code for one compiler or to test in both compilers. So, at the end, in the best case scenario you will get rid of the old compiler (and return to having only one compiler around) and in the worst case scenario you will fork the language.

Standardize the language sounds like a good idea, but you should notice that we haven't been able to standardize a timer system interface in all these years. Take a look to Indexing systems. I swear, if this game wasn't almost 10 years old, there would be so many compilers and languages that nobody would ever be able to share code.