The P4 language design working group has stated that P4 is an unsafe language. So what I suggested as a better alternative in the wiki entry above will likely not be realized in the foreseeable future. However, we can try to detect these sorts of uses as much as possible at compile time.
For context see this wiki entry.
https://github.com/oxidecomputer/p4/wiki/P4-Specification-Notes#reading-uninitialized-values
The P4 language design working group has stated that P4 is an unsafe language. So what I suggested as a better alternative in the wiki entry above will likely not be realized in the foreseeable future. However, we can try to detect these sorts of uses as much as possible at compile time.