I might disagee. While I got the classic CS education, I believe the real value in learning code is learning how to think through how something will work.
Your sort question is an example if that. But the sort algorithm isn’t the only way to become good at thinking logically, and I believe the inner workings of basic algorithms and data structures, which nearly ever language supplies by stock, could be left out. Students can focus on building something useful (which will require the same skill set anyway), and address the lower level stuff later.
Of course, this reminds me of the criticism professors in my school had for students learning java, instead of learning assembly and c first.