Discussion JassHelper -> some new features?

Bribe

vJass errors are legion
Reaction score
67
1. Could Zinc have "readonly" like vJass? I know it's "nonstandard" but the method operators that must be used instead are hard to view when I'm trying to make a readable library.

2. Can modules be expanded on to force the containing struct to require some methods?

3. Can modules have overridable variables/methods? Using delegate variables is fine unless you have multiple structs delegating them for different purposes.

4. Please make a struct type similar to array structs that it disables the auto-generated allocation, but without the lame inability to extend/be extended.

5. [ljass]if (condition) { u = null ; }[/ljass] please make this stop causing syntax errors in Zinc. It's really hard to visually distinguish one-line "if" statements.

6. Please use the vJass "implement" keyword in Zinc instead of "module;" as the implementation looks really weird o_O

7. Perhaps implement [ljass]default delegate structName[/ljass] so that boring people like me don't have to bang our heads against the wall to come up with some ridiculous name for it that we never use?

Thank you for (however unlikely) reading this.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
I think Vex should fix the bugs on vJass before adding these features, because Zinc will be compiled into vJass first.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
I recall him saying that (aside from major (major) bugs) JassHelper wasn't going to be developed anymore.
 

Bribe

vJass errors are legion
Reaction score
67
This game needs some added functionality, else it's going to die hard. The GUI users will switch to SC2 for simplicity, the JASS'ers will feel rejected.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
I recall him saying that (aside from major (major) bugs) JassHelper wasn't going to be developed anymore.
No, Vex said that he will continue it but no more new features will be added.
 

Jesus4Lyf

Good Idea™
Reaction score
397
This game needs some added functionality, else it's going to die hard. The GUI users will switch to SC2 for simplicity, the JASS'ers will feel rejected.
Sorry, doomsday prophet. We've already had many of you tell us WC3 is dieing. No amount of hype about it dying is going to make it last any shorter than the original SC.

More amusingly, most of what you requested already works fine in vJass.
 

Bribe

vJass errors are legion
Reaction score
67
2, 3, 4 and 7 are not supported in vJass, so technically "most" are not implemented. Technically.
 

Jesus4Lyf

Good Idea™
Reaction score
397
2, 3, 4 and 7 are not supported in vJass, so technically "most" are not implemented. Technically.
>Can modules be expanded on to force the containing struct to require some methods?
Yes, just try to call the method from within the struct...

>Can modules have overridable variables/methods? Using delegate variables is fine unless you have multiple structs delegating them for different purposes.
Function interfaces answers for overridable methods, why the hell would you override variables..??

>Please make a struct type similar to array structs that it disables the auto-generated allocation, but without the lame inability to extend/be extended.
This is mildly unfortunate. When I require this, I swallow the fact that it will generate the allocator, which simply doesn't get used. Remember the good news: destroy is overridable. So is create. :) (Good job, Vex.)

>Perhaps implement default delegate structName so that boring people like me don't have to bang our heads against the wall to come up with some ridiculous name for it that we never use?
Lol? Rearrange to delegate structName default. ;)
 

Bribe

vJass errors are legion
Reaction score
67
>Yes, just try to call the method from within the struct...

Sorry, I meant the other way around. Force the struct implementing the module to create a method by a certain name.

>Function interfaces answers for overridable methods, why the hell would you override variables..??
Function interfaces? I'll look into that, thank you :)
Override variables the way I want is actually seemingly impossible as I wanted a static if inside of a module, but modules cannot implement static if's. So forget that part.

>This is mildly unfortunate.
Why compromise when you can fix the problem? The same thing goes with how I've had to use method operators in Zinc instead of readonly, though not as extreme because at least the operators inline.

>Lol? Rearrange to delegate structName default.
And the second delegate would be named, what, default2? What if I have 50 of them, that's just wrong. I suppose I could make yet another compromise. Might as well, because I'd rather take the heat than endlessly wait for someone who doesn't care to start caring.
 

Jesus4Lyf

Good Idea™
Reaction score
397

Bribe

vJass errors are legion
Reaction score
67
OK, I got readonly to work! You just have to create a module outsize of the zinc block with readonly members, and they behave exactly the same way as you'd expect. The rest of these suggestions have pretty much been solved by your guys' helpful replies, so this thread can be closed/ignored. Thank you for your help!
 

Bribe

vJass errors are legion
Reaction score
67
JASS:

struct parent
    readonly unit dude
    method foo takes nothing returns nothing
        call KillUnit(this.dude) // valid.
        set this.dude = null // valid.
    endmethod
endstruct

struct child extends parent
    method foo takes nothing returns nothing
        call KillUnit(this.dude) // valid.
        set this.dude = null // syntax error: <dude> is readonly.
    endmethod
endstruct


Readonly means the variable can be set only by the struct in which it is declared. It gives the child-structs functionality with that variable, but it protects that variable from getting re-assigned.
 

Crazy_Dead

New Member
Reaction score
24
So like a private? :p Dont really get it... :S

Readonly makes this member to be unusable in other structs/functions, even by using [ljass]local data d = data.create()[/ljass] ?? :eek:
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Readonly is read only.
You can get the value but not write it at outside of struct.
You can write/read it in struct only.
The feature is mainly for protecting the variable from being edited.
 

Bribe

vJass errors are legion
Reaction score
67
Yea, but not merely out of struct context; even a struct that extends the struct with that variable will not be able to set that variable.

Private > No access outside of scope.
Readonly > Accessible but not assignable outside of scope. I think this only works for structs.
Public > Complete access outside and inside of scope.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top