2 ms·
> The reason why the "wrong" way is used at all is because many old programming languages forced you to declare variables at the beginning of blocks. It was eas
by kevin_thibedeau 7y ago
> The reason why the "wrong" way is used at all is because many old programming languages forced you to declare variables at the beginning of blocks. It was easier for compilers. It's no longer an issue, however. Not even in C.
It's still very much an issue for a certain compiler vendor without full support for C99.
- asveikau 7y agoThe vendor you are likely referring to fixed mixed declarations and code in their 2015 release.
- kevin_thibedeau 7y agoI still have to write code that builds against earlier versions. Code that primarily targets a backwards embedded compiler that only does C++98 but has had usable C99 support since forever.