HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

cJASS - Code in JASS with C syntax.

08-22-2009, 07:52 PM#1
TriggerHappy
http://cjass.xgm.ru/

Pretty cool.
08-22-2009, 10:53 PM#2
Eleandor
cjass macro's > vjass macro's.

Other than that I like vjass syntax more for warcraft 3. Main reason is that you're getting a real ugly mix of c-like syntax and jass syntax. For example:
Collapse JASS:
timer t = new timer
call DestroyTimer(t) // sorry, but this is stupid. It should be "delete t" or else c syntax is worthless since you're still mixing it with old-school jass
I've also experienced a few bugs such as return (a + b) being translated to call return(a+b) which results in a compile error.
08-23-2009, 04:41 AM#3
Earth-Fury
cJASS: The ultimate collection of anti-features that Vex has fought hard to not pollute the language with, all in one convenient package!
08-23-2009, 05:38 AM#4
Vexorian
Quote:
Originally Posted by Earth-Fury
cJASS: The ultimate collection of anti-features that Vex has fought hard to not pollute the language with, all in one convenient package!
That's a good thing, it saves me from having to implement them, I'll just lead people towards it when they begin asking for crazy stuff.

"new" and "delete" are not C syntax.
08-23-2009, 01:48 PM#5
Eleandor
Ok, it's c++. I thought it was obvious enough what I meant...
08-23-2009, 02:24 PM#6
Vexorian
No.
08-23-2009, 03:04 PM#7
Joker
I looked at one of the example spells and the codes look terrible.
08-23-2009, 03:13 PM#8
BlinkBoy
Lol, vex, cJass is killing you!


Btw, the preprocessor crashed in that part, xD

looks like this is illegal or I made a syntax error, xD:
Collapse JASS:
define
      int = integer
enddefine

struct A
      int h
      int m
endstruct
08-23-2009, 03:32 PM#9
Alevice
what a horrible mess. They should have just made another language there, not just plaguing jass with horrible sytnax features that don't provide anything greater.
08-23-2009, 04:35 PM#10
BlinkBoy
Quote:
Originally Posted by Alevice
what a horrible mess. They should have just made another language there, not just plaguing jass with horrible sytnax features that don't provide anything greater.

Nah, they made a great job. I prefer working on C like syntax than jass syntax, C syntax is way more logic and easier to work once you get into it. They have improved a lot since they started, but they still need to implement the syntax better and sepparate more from JASS. I would really like a delete and new keywords instead of having to define them.

I think the best thing is that I can extract some functions from my C++ math modules and pass them into my map.
08-23-2009, 04:53 PM#11
Alevice
Quote:
Originally Posted by BlinkBoy
Nah, they made a great job. I prefer working on C like syntax than jass syntax, C syntax is way more logic and easier to work once you get into it. They have improved a lot since they started, but they still need to implement the syntax better and sepparate more from JASS. I would really like a delete and new keywords instead of having to define them.

I think the best thing is that I can extract some functions from my C++ math modules and pass them into my map.

Being more familiar with C syntax (which cJass really isnt) doesn't mean more logic. I am familar with quite a bunch of languages (Delphi Pascal, Javascript, Java, C99, C++) so I really don't care if my jass has my syntax.

If they added more really powerful features, like anonymous functions, namespaces, real subsscopes, and shit, i'd be impressed. The way it is, its just a way to clutter the syntax
08-23-2009, 05:51 PM#12
Toadcop
define is awesome ! <3
08-23-2009, 06:03 PM#13
Spec
Quote:
Originally Posted by BlinkBoy
looks like this is illegal or I made a syntax error, xD:
Collapse JASS:
define
      int = integer
enddefine

struct A
      int h
      int m
endstruct

This works:
Collapse JASS:
define {
  int = integer
}

struct A
  int h
  int m
endstruct

This works and looks nice:
Collapse JASS:
define int = integer

struct A { int h, m }
Quote:
Originally Posted by Alevice
If they added more really powerful features, like anonymous functions, namespaces, real subsscopes, and shit, i'd be impressed.
I should notice, that adichelper was released ~4 months ago. So, there's a wide bunch of features needed to be implemented.

Oh, atm Adolfushka already fixed that "enddefine" problem.
08-23-2009, 06:25 PM#14
Van Damm
I think, it's our fault that somebody not related to the development started a thread about our tool, but we were going to release it to public only when it would be more stable and fully documented.
I'm now working on stand-alone cJass Manual, it will be included to the package and available for download later this week.





If you however choose to try cJass now and run into any bugs, please submit them to me, or to our Feedback section






Quote:
Originally Posted by Eleandor
Other than that I like vjass syntax more for warcraft 3. Main reason is that you're getting a real ugly mix of c-like syntax and jass syntax. For example:
Collapse JASS:
timer t = new timer
call DestroyTimer(t)
For now new timer isn't actually core cJass syntax, that's just another define define <new timer> = CreateTimer(), that' included to an include file in the standard cJass library. You can make your syntax very ugly or very convenient using cJass, it's all up to you.
08-23-2009, 08:45 PM#15
Barade
Much better syntax than Jass or vJass.
Maybe this will replace vJass for sometime. Isn't it open source?