Re:Lines of code that changed everything
by rstuart4133 on Thursday November 28, 2019 @05:54PM
(#21660698)
> the notational convenience is considerable,
You are right of course - but this is a moment in time thing. ++ and it's equivalents aren't so convenient now. One of the things that strikes me about modern languages is the disappearance of integers, and the associated integer arithmetic such as the s++ in this example.
It turns out we were using integers as a poor mans iterator, and s++ simply meant "next item please". Once we starting using "for element in sequence" to access iterators many of the integers disappeared - they are only used to represent integer things in the real world now. Just about every instance of ++ also disappeared because "next item in iterator" was it's main use. Turns out integers modelling things in the real world rarely need incrementing. So much so that modern languages don't bother including ++ or the Pascal equivalent, succ().
You are right of course - but this is a moment in time thing. ++ and it's equivalents aren't so convenient now. One of the things that strikes me about modern languages is the disappearance of integers, and the associated integer arithmetic such as the s++ in this example.
It turns out we were using integers as a poor mans iterator, and s++ simply meant "next item please". Once we starting using "for element in sequence" to access iterators many of the integers disappeared - they are only used to represent integer things in the real world now. Just about every instance of ++ also disappeared because "next item in iterator" was it's main use. Turns out integers modelling things in the real world rarely need incrementing. So much so that modern languages don't bother including ++ or the Pascal equivalent, succ().