ID:2067358
 
Not Feasible
Applies to:
Status: Not Feasible

Implementing this feature is not possible now or in the foreseeable future
PHP does this for arrays, not sure if other languages do it, but it'd be cool if:

var/list/l = list(1, 2, 3, 4)

l[] = 5


had the same affect:

var/list/l = list(1, 2, 3, 4)

l[++l.len] = 5;


That means, something like this would be possible:
var/list/l = list(1, 2, 3, 4)
var/list/l2 = list(5, 6, 7, 8)

l[] = l2

where the final list would be: list(1, 2, 3, 4, list(5, 6, 7, 8)).


This would be preferred over the behavior of the + operator and list.Add proc, since those concat the lists; when sometimes you literally want to put a list into another list.
Seems like a nice syntactic convenience, but the question is whether it's difficult to implement and if it's worth it to to do.
This is not a common syntax, so I'm putting the kibosh on it. Doesn't make sense to implement.
Lummox JR resolved issue (Not Feasible)
very upsetting
Pure syntactic sugar is generally not a good use of time to implement.