Recent content by weaaddar

  1. W

    Good Benchmarks?

    recursion is cheaper than the loop construct.
  2. W

    The true use of 'constant'?

    Except that some constant natives have side effects or inconsistent returns. ergo its useless.
  3. W

    The true use of 'constant'?

    The constant keyword is meant to imply something about usage, but because the constant natives are terrible and stateful, it doesn't really mean anything.
  4. W

    Why encapsulation? why private? Why scopes?

    No this is a pretty well understood practice, and in the real world its godsend. C# even made the sytatic sugar super duper easy:: public MyType MyObj{get;private set;} Is how you would declare an object that is "readonly" by the outside world. You can latter down the line add a backing...
  5. W

    Why encapsulation? why private? Why scopes?

    Not true. The point behind something like:: private MyObj _obj; public MyObj obj { get{ return _obj; } set{ _obj = value; } } Is because if you have code using your DLL, and the DLL changes and let say you add some logic to the getter like:: ... get{ return _obj ?? _obj = new MyObj(); }...
  6. W

    What's more efficent, collections or arrays?

    Eh actually the code comes down localvar = array[localvar] vs localvar = localvar + 1 The localvar+1 is faster than the array read.
  7. W

    Jass+lua?

    Hooray for a crazy idea that actually worked [on the second time]. Now, I wonder can you open inputwar3map.j (i.e. the file you are using) for more preprocessing abuse? Just imagine implementing Template sby using lua and replacing stuff found in your map using <>, and then creating the right...
  8. W

    Jass+lua?

    Oh I mean do File I/O. Like in the lua create a text file then have a //! import "fileYouMadeInLua.j" directive. Something like:: //! i LuaFileOpenHere("someFile.j",w+); //! i OutToFile("function luaTest takes nothing returns nothing"..char(10).."endfunction"); //! i...
  9. W

    What's more efficent, collections or arrays?

    Look at my benchmark thread for enumeration vs array vs linked list where it shows that an array of units will be faster than a linked list of units. Please stop propagating the myth.
  10. W

    What's more efficent, collections or arrays?

    Bleh stop propagating the myth. Array is faster in SOME cases as is LinkedList. A linkedlist of units is slower than an array of units, where as a linked struct using the module or a hand crafted system will be faster than the array that indexs a struct. (note: I'm saying they are both fast and...
  11. W

    Jass+lua?

    I think if you write an extension that creates a .j file that you can use lua to import that'll work. I just don't know how to do that.
  12. W

    Jass+lua?

    Object merger works because it accepts a $FileName$ you need some sort of external block that accepts an extension. The example has something interesting in it, in that I do some compile time code as I generate I built up an ability and use arrays and what not. I do some native lua operations...
  13. W

    Jass+lua?

    Yeah, you can do it with external block and object merger as an example. As a note, its compile time only, and you can't get the value out unless it has a readable sideeffect. I.e. setting an ItemName you can't query the lua directly, but you can use the Jass native. You can't use Lua for jass...
  14. W

    Using Tomes of Damage to add natural damage to stuff

    Yeah here is the 2004 implementation when we weren't quite as sophisticated:: http://wc3jass.com/viewtopic.php?t=202
  15. W

    Snippet DbMod-alpha

    Less icon space on the command card? Hey it was a great Idea in 2005 when I first made this resource :P
Top