Comment by Jensson

3 years ago

That is how you write programs in competitive programming, just put all the data you need in a nice table structure and use indexes instead of references. It is very readable and easy to reason about for simple programs and is extremely fast to write and performant, that is how you are able to implement novel algorithms in minutes. But it doesn't scale, indexes aren't type checked nor do they tell you which collection they point towards.

But yeah, knowing how to program like that is useful, learning new style will never hurt, but being forced to code like you code in competitive programming isn't a good thing for a language.