3 ms·
GPtrArray doesn't tell you the type of the pointer inside the array. You are throwing away type safety. This is a regression rather than an improvement. It's li
by kccqzy 4y ago
GPtrArray doesn't tell you the type of the pointer inside the array. You are throwing away type safety. This is a regression rather than an improvement. It's like making every array void*a[N]. When I used to write GLib code, I can't count how many bugs were introduced when I thought the GPtrArray contained a type of pointer but it contained some other type.
Also, which part of GPtrArray prevents you from making out of bounds access? Last time I checked it doesn't.
- xigoi 4y ago> GPtrArray doesn't tell you the type of the pointer inside the array. Well, that's also C's fault for not having parametric polymorphism.