|
|
|
|
|
by dathinab
1602 days ago
|
|
no not at all IMHO requiring all types in C to have a valid "all zero" variant so that this pattern can be used isn't grate either, somewhat of an anti-pattern even. But an anti-pattern needed for ergonomic C. The post is a good example for trying to program "like in a different language" just because some tools somewhat allow it. Like in this case "programming rust like it's C". And if you do rust FFI and have a lot of C experience it is tempting. |
|