Beginning with generics ^^:
JASS:
struct List<E>
E array elements
integer count
public method add takes E element
set this.elements[this.count] = element
set this.count += 1
end
static method onInit
local List<integer> li = cast 1 to List
call li.add(42)
call li.add(24)
call li.add("1") // CompileException: Element <element> must have/return a value of type <integer> but given <string>
end
end