5 ms·
How come a CS bachelor never wrote a for loop?
by drowsspa 3y ago
How come a CS bachelor never wrote a for loop?
- oriolid 3y agoThey could just write loops and remember that repeating the variable name with ++ is part of loop syntax without knowing what it means. Almost like text-generating AI would do it (ducks).
- davnicwil 3y agoI don't know, but I also don't care much because it doesn't matter. Again, can they quickly understand and apply the knowledge once it is explained to them is all that matters.
- balfirevic 3y agoIt also matter that they apparently wrote a for loop a number of times without wondering what each of those symbols actually does and just treated it as magic incantation. Edit: assuming they didn't use a language where such idiom doesn't exist or is not common, as another commented pointed out.
- ApolloFortyNine 3y agoIn recent years it's very possible they either don't use a language where that syntax is ever required (python) or just use one of the foreach variants in pretty much every language.
- drowsspa 3y agoI can only think of Python, but are people learning that alone these days? In every other popular language, I can't imagine not ever encountering a situation where you also need to know the index of the iteration.
- ApolloFortyNine 3y agoBut also in every language there's syntax sugar to get the index. In reality it's honestly just better in 99% of situations.
- _dain_ 3y agonot every language uses i++. increment operators are a language design antipattern anyway, not some fundamental knowledge.
- rvba 3y agoMaybe cheated, maybe third world country diploma mill, maybe sports scholarship