4 ms·
Indeed, you don't understand. Your proposal is excellent and it would in time heal a major C pain point. However - and I'm sorry to say - your politics game is
by ljosifov 3y ago
Indeed, you don't understand. Your proposal is excellent and it would in time heal a major C pain point. However - and I'm sorry to say - your politics game is non-existent, I'm afraid. Not to be super cynical, but: the politically astute way to go about it would've been to 1) not make your proposal public to all; but 2) implant the idea in the heads of few influential committee members; then 3) wait for them to "come up with a new and excellent idea" to you, at which point you'd exclaim "what a marvelous idea". It's not even this is some exception on part of the committee members - the behavior of the members is but the norm in humans groups. And we see this too in the replies to your comment in this thread and past comments on this subject (e.g. https://news.ycombinator.com/item?id=17585357 https://news.ycombinator.com/item?id=17585357) - random people will bend backwards, not understand, misunderstand, make fools of themselves, come up with most ridiculous excuses for reasons, anything but acknowledge someone else's good idea. Maybe it's part and parcel of thoroughly thrashing an idea to see if it stands. But maybe gone too far in this case.
On a more cheerful note - I don't know how and when, I missed the event, and it may well be that it happened by accident - but C got the ability to access N-dim (N>1) array elements with dimensions known at run time, not only at compile time - learned about it in https://jorengarenar.github.io/blog/vla-usecases https://jorengarenar.github.io/blog/vla-usecases :
int n = ..., m = ...;
float (*arr)[n][m] = malloc(sizeof *arr); // `n` and `m` are tun-time variables with dimensions
if (arr) {
// (*arr)[i][j] = ...;
free(arr);
}
- WalterBright 3y agoYou're right, I'm not very political. A similar thing happened when I submitted a formal proposal for `static if` (another popular D feature). It was vehemently rejected. After some time passed, another person submitted more or less the same thing, and it was accepted into the Standard. It doesn't matter to me if C accepts the proposal to fix array overflows or not, as I don't write significant code in C any more (all my existing C code I still use was converted to D).
- ljosifov 3y agoAh - so not a one off. Socially - person A pushes for change through various stages, spending time, effort and own personal social credit, persuading very opinionated people along the way to support the change. If successful, then person B, the originator of the idea, gets most of the glory for the change. Person A would need to be more self-less, ego-less, willing to take pain for no personal gain, than average - so not very likely to happen.