• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[vJASS] Table

Deleted member 219079

D

Deleted member 219079

Last updated: 6.1.2015
Table
v1.0.4

Quick functionality:
local Table t = Table.create() <- Assign a newly allocated instance of Table for local variable t
t[10]=15 <- Bind integer 15 to index 10
local integer i = t[10] <- Make i hold the value returned from index 10 of t
t.flush() <- Clear all data bound to t
t.has(10) <- Returns whether index 10 has saved integer
t.destroy() <- Clears and deallocates the instance of Table assigned to t​

Script:
JASS:
library Table // Date: 5.1.2015 , Updated: 6.1.2015
	//	-------------------------
	
	//		Table v1.0.4
	//			Globals
	
	//	-------------------------
	globals
		private constant boolean SLOW_ALLOC = true
			/*	SLOW_ALLOC = true:
					+Allows you to use more than 8190 instances, with hashtable
					-Some say hashtable read is 6x slower than array read
				SLOW_ALLOC = false
					+Allocation is as fast as it can get
					-Max 8190 instances (overflow only checked for in debug mode)	*/
		private constant boolean IGNORE_OVERFLOWN = true
			/*	Note: Only used when SLOW_ALLOC = false
				IGNORE_OVERFLOWN = true:
					+Allocation doesn't break when deallocation does
					-Causes dead instances when there's more than 8191 recycled instances
				IGNORE_OVERFLOWN = false:
					+Faster deallocation than (true)
					-Allows only 8190 instances										*/
		private constant boolean CHECK_DOUBLE_FREE = false
			/*	CHECK_DOUBLE_FREE = true:
					+Checks whether recycler already has deallocated instance
					-Costs an instance, and hashtable read+write per destroy
				CHECK_DOUBLE_FREE = false:
					+Faster and recommended
					-Doesn't check for double free (maybe dangerous)				*/
	endglobals
	
	//	-------------------------
	
	//		Table v1.0.4
	//			Table
	
	//	-------------------------
	// Table.create()		- gives you new instance of Table
	// [n]					- gives you value bound to n
	// [n]=m				- binds value m to n
	// .flush()				- clears data bound to instance
	// .has(n)				- returns whether index n is used
	// .destroy()			- flushes and destroys the instance
	globals
		private constant hashtable T = InitHashtable()
	endglobals
	struct Table extends array
		static if CHECK_DOUBLE_FREE then
			private static thistype dfC // doublefreeChecker
		endif
		method operator [] takes integer i returns integer
			return LoadInteger(T,this,i)
		endmethod
		method operator []= takes integer i, integer val returns nothing
			call SaveInteger(T,this,i,val)
		endmethod
		method has takes integer i returns boolean
			return HaveSavedInteger(T,this,i)
		endmethod
		method flush takes nothing returns nothing
			call FlushChildHashtable(T,this)
		endmethod
			// allocation:
		private static integer C=0 // instance count
		private static integer ttArrM=-1 // 0-based array
		static if SLOW_ALLOC then
			static method create takes nothing returns thistype
				if ttArrM>-1 then
					static if CHECK_DOUBLE_FREE then
						set dfC [LoadInteger(T,0,ttArrM)]=0
					endif
					set ttArrM=ttArrM-1
					return LoadInteger(T,0,ttArrM+1)
				endif
				set C=C+1
				return C
			endmethod
		else
			private static thistype array ttArr
			static method create takes nothing returns thistype
				if ttArrM>-1 then
					static if CHECK_DOUBLE_FREE then
						set dfC [ttArr[ttArrM]]=0
					endif
					set ttArrM=ttArrM-1
					return ttArr[ttArrM+1]
				endif
				set C=C+1
				return C
			endmethod
		endif
		method destroy takes nothing returns nothing
			static if CHECK_DOUBLE_FREE then
				if dfC [this]==1 then
					debug call BJDebugMsg("|c00ff0000Error: Table_instance"+I2S(this)+": is destroyed twice.")
					return
				endif
				set dfC[this]=1
			endif
			call FlushChildHashtable(T,this)
			static if SLOW_ALLOC then
				set ttArrM=ttArrM+1
				call SaveInteger(T,0,ttArrM,this)
			else
				static if IGNORE_OVERFLOWN then
					if ttArrM!=8190 then
						set ttArrM=ttArrM+1
						set ttArr[ttArrM]=this
					endif
				else
					call FlushChildHashtable(T,this)
					debug if ttArrM==8190 then
					debug 	call BJDebugMsg("|c00ffff00Warning: Due to overflow, Table_instance"+I2S(this)+" is inusable.")
					debug else
						set ttArrM=ttArrM+1
						set ttArr[ttArrM]=this
					debug endif
				endif
			endif
		endmethod
		static if CHECK_DOUBLE_FREE then
			private static method onInit takes nothing returns nothing
				set dfC = thistype.create()
			endmethod
		endif
	endstruct
	
	//	-------------------------
	
	//		Table v1.0.4
	//			TableArr
	
	//	-------------------------
	// TableArr.create(n)	- gives you new instance of TableArr, with n as max index
	// [n]					- returns instance of Table bound to index n
	// .destroy()			- flushes and destroys the instance
	// .flush()				- flushes Tables bound to the instance
	globals
		private constant boolean TABLEARR_SAFE = true
	endglobals
	struct TableArr extends array
		method operator [] takes integer i returns Table
			static if TABLEARR_SAFE then
				local Table t = LoadInteger(T,this,i)
				if t==0 then
					debug call BJDebugMsg("|c00ff0000Error: Tried to access unused index @TableArr_instance"+I2S(this))
				endif
				return t
			endif
			return LoadInteger(T,this,i)
		endmethod
		method flush takes nothing returns nothing
			local integer i=0
			local Table t
			loop
				set t = LoadInteger(T,this,i)
				exitwhen t==0
				call FlushChildHashtable(T,t)
				set i=i+1
			endloop
		endmethod
		method destroy takes nothing returns nothing
			local integer i=0
			local Table t
			loop
				set t = LoadInteger(T,this,i)
				exitwhen t==0
				call t.destroy()
				set i=i+1
			endloop
			call Table(this).destroy()
		endmethod
		static method create takes integer max returns thistype
			local thistype this = Table.create()
			local integer i = 0
			loop
				call SaveInteger(T,this,i,Table.create())
				exitwhen i==max
				set i=i+1
			endloop
			return this
		endmethod
	endstruct
	
	//	-------------------------
	
	//		Table v1.0.4
	//			Textmacros
	
	//	-------------------------
	//! textmacro TABLE_EXTEND takes PRIVACY, ALIAS, TYPE, TABLEALIAS
		/*	E.g. if you want to use Table for widgets:
				//! runtextmacro TABLE_EXTENDS("","Table_Widget","widget","WidgetHandle")
		*/
	$PRIVACY$ struct $ALIAS$ extends array
		implement Table_ExtendMod
		method operator [] takes integer i returns $TYPE$
			return Load$TABLEALIAS$(eT,this,i)
		endmethod
		method operator []= takes integer i, $TYPE$ val returns nothing
			call Save$TABLEALIAS$(eT,this,i,val)
		endmethod
	endstruct
	//! endtextmacro
	public module ExtendMod
		static hashtable eT // extended table
		static method create takes nothing returns thistype
			return Table.create()
		endmethod
		method destroy takes nothing returns nothing
			call Table(this).destroy()
		endmethod
		private static method onInit takes nothing returns nothing
			set eT=T
		endmethod
	endmodule
endlibrary

Internally added functionality:
TableArr:
local TableArr ta = TableArr.create(3) <- Assign a newly allocated instance of TableArr for local variable ta, with max index of 3
ta[0][10]=15 <- Bind integer 15 to index 10 of the Table at index 0
local integer i = ta[0][10] <- Make i hold the value returned from index 10 of Table at index 0
ta.flush() <- Clear all data bound to children of ta
ta.destroy() <- Clears and destroys children of ta, also destroys ta

TableList:
(Temporarily removed)​

Added functionality via plugins:
TableLibrary:
JASS:
library TableLibrary requires Table
	//	-------------------------
	
	//		Table v1.0.4
	//			Extend - library
	
	//	-------------------------
	/*
		Textmacro:
			//! textmacro TABLE_EXTEND takes PRIVACY, ALIAS, TYPE, TABLEALIAS
			
		What are these?
			Makes so that you can extend the variable type variety of Table.
			
		How to use?
			Use the textmacro like used below.
			
		How to use with TableArr?
			Let's say tArr is our variable, assigned to an allocated instance
			of TableArr with max index of 2, and we wish to store unit to index
			1 of tArr and index 3 of the Table. We'll use it like this:
				Table_Unit(tArr[1]) [3] = CreateUnit(Player(0),'hfoo',0,0,270)
			Now, to read it, we'll use:
				Table_Unit(tArr[1]) [3]
	*/
		
	//! runtextmacro TABLE_EXTEND ("","Table_Unit","unit","UnitHandle")
	//! runtextmacro TABLE_EXTEND ("","Table_Real","real","Real")
	//! runtextmacro TABLE_EXTEND ("","Table_Player","player","PlayerHandle")
endlibrary
Table_Unit t = Table_Unit.create() <- Assign a newly allocated instance of Table_Unit to local variable t
t[4]=CreateUnit(Player(0),'hfoo',0,0,270) <- Saves unit to index 4 of t
local unit u = t[4] <- Make u hold the value bound to index 4 of t

TableInterface:
JASS:
library TI /* =TableInterface */ requires Table
	//	-------------------------
	
	//		Table v1.0.4
	//			Interface
	
	//	-------------------------
	/*	Table interface vs normal struct?
		+Supports ~2 000 000 instances + 4 000 structs vs 8 190 instances and 1 struct
		+TI_Struct.fire(n) will trigger the "fire" method on n's creator struct
		-Some say hashtable read is 6x slower than array read
		-Costs TriggerEvaluate() and function call
		
		Set-up guide: 
		
			1. Sort your methods in such order: ( im.=implement )
		
			im. TI_Top
			...
			void destroy()
				.deallocate()
			...
			static thistype create(<stuff>)
				local thistype this=thistype.allocate()
			...
			im. TI_Bot
			
			2. Have non-static method called "fire" in any place of "..."
			
			3. Your struct now uses interface! 									*/
			
	globals	// limit config:
		private constant integer MAX_STRUCTS = 4000 // how many structs can use the interface
		/* Note: Please don't set MAX_STRUCTS higher than 8190/2				*/
		private constant integer MAX_INSTANCES = 100000 // how many instances can be allocated at once
		private constant boolean SLOW_ALLOC = true
		/* Note: You'll manually set SLOW_ALLOC to match MAX_INSTANCES > 8190, because jasshelper's gay
			SLOW_ALLOC = true:
				+Supports over 8190 structs
				-Costs Table calls
			SLOW_ALLOC = false:
				+Faster
				-Supports up to 8190 structs									*/
	endglobals
	
// ---------------
//! runtextmacro TI_NEW ("MAX_STRUCTS","MAX_INSTANCES","SLOW_ALLOC")
//! textmacro TI_NEW takes MAX_STRUCTS, MAX_INSTANCES, SLOW_ALLOC
	globals
		private Table tiT=0 // TI_Table
		private integer ttArrM=-1
		private integer C=0
		private integer idM=-1
		private trigger array tArr [$MAX_STRUCTS$] [2]
		private constant integer INDEX_DESTR = 0
		private constant integer INDEX_FIRE = 1
	endglobals
	static if not $SLOW_ALLOC$ then
		globals
			private integer array ttArr
		endglobals
	endif
	public struct Struct extends array
		readonly static thistype s // struct
		static if DEBUG_MODE then
			method fire takes nothing returns boolean
		else
			method fire takes nothing returns nothing
		endif
			static if $SLOW_ALLOC$ then
				local integer id = tiT[this*2]
			else
				local integer id = tiT[this]
			endif
			if id!=-1 then
				set s=this
				call TriggerEvaluate(tArr[id][INDEX_FIRE])
				debug return true
			endif
			debug return false
		endmethod
		static if DEBUG_MODE then
			method pop takes nothing returns boolean
		else
			method pop takes nothing returns nothing
		endif
			static if $SLOW_ALLOC$ then
				local integer id = tiT[this*2]
			else
				local integer id = tiT[this]
			endif
			if id!=-1 then
				set s=this
				call TriggerEvaluate(tArr[id][INDEX_FIRE])
				call TriggerEvaluate(tArr[id][INDEX_DESTR])
				debug return true
			endif
			debug return false
		endmethod
		method destroy takes nothing returns nothing
			static if $SLOW_ALLOC$ then
				local integer id = tiT[this*2]
			else
				local integer id = tiT[this]
			endif
			if id==-1 then
				set ttArrM=ttArrM+1
				static if $SLOW_ALLOC$ then
					set tiT[ttArrM*2+1]=this
				else
					set ttArr[ttArrM]=this
				endif
			else
				set s=this
				call TriggerEvaluate(tArr[id][INDEX_DESTR])
			endif
		endmethod
	endstruct
	
// ---------------
	
	public module Top
		static integer ID=-1
		static method allocate takes nothing returns thistype
			local thistype this
			if ttArrM>-1 then
				set ttArrM=ttArrM-1
				static if $SLOW_ALLOC$ then
					set this = tiT[(ttArrM+1)*2+1]
					set tiT [this*2] = ID
				else
					set this = ttArr[ttArrM+1]
					set tiT [this] = ID
				endif
				return this
			elseif C<$MAX_INSTANCES$ then
				set C=C+1
				static if $SLOW_ALLOC$ then
					set tiT [C*2] = ID
				else
					set tiT [C] = ID
				endif
				return C
			debug else
			debug call BJDebugMsg("|c00ff0000TableInterface ERROR: Exceeding $MAX_INSTANCES$|r")
			endif
			return 0
		endmethod
		method deallocate takes nothing returns nothing
			set ttArrM=ttArrM+1
			static if $SLOW_ALLOC$ then
				set tiT [this*2] = -1
				set tiT [ttArrM*2+1] = this
			else
				set tiT [this] = -1
				set ttArr[ttArrM] = this
			endif
		endmethod
	endmodule
	
// ---------------

	public module Bot
		static if thistype.fire.exists and thistype.destroy.exists then
		private static method onDestr takes nothing returns boolean
			call thistype(Struct.s).destroy()
			return false
		endmethod
			private static method onFire takes nothing returns boolean
				call thistype(Struct.s).fire()
				return false
			endmethod
			private static method onInit takes nothing returns nothing
				if idM<$MAX_STRUCTS$ then
					set idM=idM+1
					set ID=idM
					if tiT == 0 then
						set tiT=Table.create()
					endif
					set tArr[ID][INDEX_DESTR]=CreateTrigger()
					call TriggerAddCondition(tArr[ID][INDEX_DESTR],Condition(function thistype.onDestr))
					set tArr[ID][INDEX_FIRE]=CreateTrigger()
					call TriggerAddCondition(tArr[ID][INDEX_FIRE],Condition(function thistype.onFire))
				debug else
					debug call BJDebugMsg("|c00ff0000TableInterface ERROR: Exceeding $MAX_STRUCTS$|r")
				endif
			endmethod
		endif
	endmodule
	
// ---------------
//! endtextmacro
endlibrary
See demo below for use guide.​

Demo:
JASS:
scope TestInferface initializer init
	//! runtextmacro TABLE_EXTEND ("","sTable","string","Str")
	//! textmacro TI_TEST_CHILD takes ABC
		private struct Child$ABC$ extends array
			implement TI_Top
			private static sTable sT
			method destroy takes nothing returns nothing
				call BJDebugMsg("Destroying Child$ABC$_instance"+I2S(this))
				call deallocate()
			endmethod
			static method create takes string s returns thistype
				local thistype this = thistype.allocate()
				set sT[this]=s
				return this
			endmethod
			method fire takes nothing returns nothing
				call BJDebugMsg("Child$ABC$ says: "+sT[this])
			endmethod
			private static method onInit takes nothing returns nothing
				set sT=Table.create()
			endmethod
			implement TI_Bot
		endstruct
	//! endtextmacro
	//! runtextmacro TI_TEST_CHILD("A")
	//! runtextmacro TI_TEST_CHILD("B")
	//! runtextmacro TI_TEST_CHILD("C")
	
	private function OnEsc takes nothing returns boolean
		local TI_Struct a = ChildA.create("Boo!")
		local TI_Struct b = ChildB.create("Boo!")
		local TI_Struct c = ChildC.create("Boo!")
			// test recycler
		call BJDebugMsg("a: "+I2S(a)+" ; b: "+I2S(b)+" ; c: "+I2S(c))
		call a.destroy()
		call b.destroy()
		call c.destroy()
		set a = ChildA.create("Boo!")
		set b = ChildB.create("Boo!")
		set c = ChildC.create("Boo!")
		call BJDebugMsg("a: "+I2S(a)+" ; b: "+I2S(b)+" ; c: "+I2S(c))
		call a.pop()
		call b.pop()
		call c.pop()
		return false
	endfunction
	
	private function init takes nothing returns nothing
		local trigger t = CreateTrigger()
		call TriggerAddCondition(t,Condition(function OnEsc))
		call TriggerRegisterPlayerEvent(t,Player(0),EVENT_PLAYER_END_CINEMATIC)
		set t = null
		
		call BJDebugMsg("Hit ESC to test Table Interfaces")
	endfunction
endscope
Uses Table and TableInterface. Also shows how to use TableLibrary's Tables with "sTable".​


I'd prefer constructive criticism, "why do you do it like this? ..." -> "you do it like this: ... But I think it's better to do it like this: ..." ; "why do you think this is better than nnn?" -> "I don't think this is better compared to nnn, because nnn ..." ; "your algorithm is bad." -> "your algorithm works like ... , but I think it's better to make like ...". It's stupid to remind people to be constructive, but I often see people say "needs fix", forgetting about "change to ...". If you see a thing that needs fix, say how you'd fix it.
 

Deleted member 219079

D

Deleted member 219079

Is there a reason why you uploaded this when the following exists?
This doesn't use "dex" or "handles" or "agents" or fancy hexadecimals. Type extending is done externally.
Also the TableArr is different. And I don't use textmacros or modules to make the Table struct itself difficult to read.
This resource appears to offer nothing new.
It does, it adds interface.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
What is the problem with "dex" which isn't a public API?

If you don't use handle or agent in your personal map, then delete them. Either way, Vex's map optimizer kills those functions.

Type extending in your resource will have to be done manually by each user, making it difficult to implement your resource publicly if a user needs those added types.

Tons of resources are using Table API now, you'll need to come up with your own API if you want to break the mold.

The only functionality you added was some stuff that has nothing to do with indexing and belongs in a separate resource.

I recommend to make your added components of this resource extend off of the existing Table that is the approved standard for hashtable indexing.

Also, using the argument that the Table syntax is hard to read? Just downvote the Table resource and give your feedback on how it could be improved, but don't make a whole new resource just because the old resource isn't as readable as you'd like it to be.
 

Deleted member 219079

D

Deleted member 219079

I don't know what API means neither I care...
Type extending in your resource will have to be done manually by each user, making it difficult to implement your resource publicly if a user needs those added types.
You can just use private for $PRIVACY$ to top of your library/scope (see demo), so the generated struct cannot interfere with rest of code.
I'll enhance the TableLibrary for 1.0.5, will add so that the textmacro-generated scripts will be forgot if the name is already being used in TableLibrary. This makes it so that you can e.g. do //! runtextmacro TABLE_EXTEND ("","Table_String","string","Str") on top of your trigger. If I add Table_String to the official library, that user-made Table_String will be forgotten.
Then it won't make it any difficult. You just use stuff in library, or declare it manually.
Tons of resources are using Table API now, you'll need to come up with your own API if you want to break the mold.
Then imma not break any mold. If that'll prevent this system to be approved, then I may.
The only functionality you added was some stuff that has nothing to do with indexing and belongs in a separate resource.
You mean TableInterface? It makes it easy to have huge structs (100000 instances and 4000 structs currently) under one interface. Non-table interface - structs can't do this.
I take interfaces as indexing solution.
I recommend to make your added components of this resource extend off of the existing Table that is the approved standard for hashtable indexing.
Sounds like advertising your own Table >.<
Omg, I don't want to argument in jass section, Medivh's tower for that. I just want feedback on my system.
The difficult on using the type extending was a good catch, I'll fix it.
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
I can't recommend this be approved. I think that the current Table is excellent, save for one update that Bribe has yet to do. Bribe, check the thread, there are numerous posts and even one update of the system. It's a simple CnP.

I'm with Bribe on this. Vexorian's wasn't enough because it didn't take advantage of the full hashtable API. Bribe's does. What more is needed that can't be done as a separate resource?

Arguments can certainly be made to include new features, like Multiboard for column arrangement and Texttag for something else I forgot, but I don't think those arguments can be made here for Table. Other than the one minor update, I don't think it can be improved upon further.


Many of the resources in the JASS section are so refined that the only way you are going to get something that is the same approved is to make it have strengths in different areas. Sometimes you can find improvements, but these improvements usually involve much more complex data structures and algorithms, like what I did with Dummy ^)^.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Vexorian's wasn't enough because it didn't take advantage of the full hashtable API. Bribe's does. What more is needed that can't be done as a separate resource?
I remember that his Table's purpose was to use it alongside structs (store integers), so maybe it was intended and not a lack of design.


@jondrean: API is the programming interface, the stuff that the "coder" uses to tell the system what to do, namely these:

local Table t = Table.create() <- Assign a newly allocated instance of Table for local variable t
t[10]=15 <- Bind integer 15 to index 10
local integer i = t[10] <- Make i hold the value returned from index 10 of t
t.flush() <- Clear all data bound to t
t.has(10) <- Returns whether index 10 has saved integer
t.destroy() <- Clears and deallocates the instance of Table assigned to t

Anyway, I think if you would change the library name, the conflicting API issues would be resolved (or maybe Bribe is referring to another issue? I dunno.)
 

Deleted member 219079

D

Deleted member 219079

Oh? I thought he meant changing methods names >.< Yes I can change the library name for next ver.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
Omg, I don't want to argument in jass section, Medivh's tower for that. I just want feedback on my system.
The difficult on using the type extending was a good catch, I'll fix it.

Arguing should always happen where its relevant.

1. Some people, like me do not have access to Medivh's tower
2. Did you see someone go arguing about terrains or maps, or even systems in Medivh's tower? Its always more relevant to argue about things in the thread than to create another one to reflect on the one that already exists.
 

Deleted member 219079

D

Deleted member 219079

Know this, I want feedback not debates. I won't now on answer comments that aren't constructive by any means. Saturday will be the day I'll update this, as I have time.
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
Part of gettimg the resource approved is arguing your case for approval if people argue against it. Just ignoring arguments against your work will end with this gy'd.

I, and several others, find this inferior to the current Table resource. Inferior resources don't get approved. Unless you can change everyone's mind, this resource will remain inferior and thus not get approved. Make sense? :)

I think that you are best making these as external resources that depend on the current Table. Tell us why you can't do that instead of running away.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Quick functionality:
local Table t = Table.create() <- Assign a newly allocated instance of Table for local variable t
t[10]=15 <- Bind integer 15 to index 10
local integer i = t[10] <- Make i hold the value returned from index 10 of t
t.flush() <- Clear all data bound to t
t.has(10) <- Returns whether index 10 has saved integer
t.destroy() <- Clears and deallocates the instance of Table assigned to t​

isn't this just an array with a few flexible options?
 
Level 31
Joined
Jul 10, 2007
Messages
6,306

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
I know about the hashtable limit.

A hashtabale is basically a 2D array, correct?

so, if I only need one of the two indexes, it's basically a normal array.

so why:
JASS:
local Table t = Table.create()
t[1]=1337

and not:

JASS:
local integer array i
set i [1] = 1337

I am likely missing something huge though since I know table is very popular among jass users.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
I guess this will get graveyarded now that author is banned and has no intention of comming back and defending his resource against still quite valid points.

Edit: to answer your question, hashtables can go up to [2147483647, 2147483647] indexes, and array can only go to [8191], which is also not secure.

So the advantage is that you can use things like GetHandleId for indexes
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Really, such "base" resources like Table (i.e those, which are frequently used by many utility or flavour systems) should not be deprecated just because of small addition/changes in API or execution.

Some points are valid, as stated, but after all those years, the core of vJass system base is already there, together with ton of other scripts. None likes being forced to change their old, good, working stuff :)
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
Not gonna approve a resource named "Table".

I think Vexorian's Table is just fine and if you need a full range API go with
Bribe's. Table is one the most used requirement for snippets/systems/spells on THW.
This one will just add unnessary confusion without gaining extra functionality.

I also agree with Bribe in his argumentation.

Someone want to defend this submission? Otherwise I will soon send it to the graveyard.
 
Top