C committee zoophile cute twink subtweets actual programmer.

https://twitter.com/FlohOfWoe/status/1743248293432299928

This guy has a neat cross-platform C library https://github.com/floooh/sokol. The original tweeter is friends with a committee C++ CUTE TWINK who is ruining C by adding dumb features like breaking the auto keyword or nullptr.

52
Jump in the discussion.

No email address required.

why would p be an int**? i would definitely expect it to be an int*, with auto resolving to int because the RHS is clearly an int*

Jump in the discussion.

No email address required.

The definition of auto as the type of the right hand side implies that auto is int* implies auto* is int**. This may not be the common reasoning, but it is a valid interpretation imo. Personally, I think auto* should just be an error. Once you start pattern matching on types, you end up recreating the crazy c++ template type deduction algorithm that forms the basis of type inference in c++.

Jump in the discussion.

No email address required.

Personally, I think auto* should just be an error.

I'll agree with you there.

I still think it would be wild if auto* actually deduced to int** since that's clearly an error (try dereferencing it twice auto *x = &y; z = **x; and watch the world burn) and quite confusing since it's so different from auto&.

I would go further though and say that changing auto in C is stupid, it's not actually necessary in C because C doesn't have complicated types like C++. If you want to use fancy abstractions use C++, it's got excellent support for C interop,

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.