I have no clue. If there is, it's not a production language. I know at least the basics of the more common production languages. Or maybe a scripting language meant for small, fast processing. It would be a kind of efficient. No need for garbage collection if the space is guaranteed freed in a few cycles.
I think its to show beginners, absolute beginners to show the value stays the same.. not sure why it wasn't a comment.. and they should understand that logic if they want to learn programming lol
There wasn't anything going through their head at that point. I see students make this mistake all the time. The blindly code without understanding what the code is suppose to be doing so they just throw ever condition in there because that's all they know.
this looks like a result of a student writing something that almost works, but without understanding how or why, and then changing things at random until the code works for the one input they have prepared. I wrote quicksort for class this way
106
u/[deleted] Jul 17 '20 edited Jul 17 '20
[removed] — view removed comment