|
Senior Member
Join Date: May 2009
Location: korea, republic of
|
08-08-2012
, 08:02
Re: Dynamic Arrays in SourcePawn
|
#24
|
to say about proposal 1, as dvander said on top, breaking existing sementics which has no problem at all.
and about the proposal 2, i will say again on below, but it also breaks existing sementics and language will get a runtime error which it cannot even catch in compile.
and the last, proposal 3, its tooooooooooooooooooooooooooooooo complex.
it`s Hierarchical pointer/non pointer(value) memory array is, to say, i cannot understand it even right now, and it feels like not a source pawn, but a source brain fuck.
sorry but all the proposal with reference type is too complex to me.
i just suggest to let us make a Explicit reference type which we can use in outside of function parameter, which must be assign it`s real target on it`s declation. while it lose proposal 3`s mad Hierarchical things, its very simple and can take 99% of programmer`s need(i cannot even imagine wut left 1 percent is)
new String:realone[*][255] = {some init};
new &String:bla[*][255] = realone;//legal
new &String:bla2[*][255];// fail at compile like "reference type must be inited on declare"
* keyword must still exist as a Explicit dynamic array type, so in function parameter we can deny Arguments in static array types to be passed into functions that needs dynamic array to be passed.
by the exist of explict dynamic array type notation, i am repeating dynamic array type notation by only []
is making a bad point in Semantics of language`s existing part
__________________
Last edited by javalia; 08-08-2012 at 08:03.
|
|
|
|