@440bx
Do you consider var obj: TObject;
as a pointer?
Because, AFAIK it is a reference. And you can use TObjectList or some other container from the template library to do that job. Without using the ^.
I wouldn't consider that a pointer but, if instead of TObject, it had been "class of object" (I probably have the syntax wrong, I stay away from objects/classes like the plague) then I would definitely consider that a pointer (a hidden one which makes it worse.)
ETA:@MarkMLI, sorry somehow I missed your post. Here are my comments on it.
If sorting is a job suitable for the inexperienced, how is it that it's taken 60 years for people to agree how to do it?
Designing sorting algorithms is definitely not for the inexperienced but, the inexperienced definitely want to use someone's sorting algorithm and, when they do, understanding pointers would quite likely serve them well.
And if sorting and searching are so trivial,
I didn't say that sorting and searching are trivial. What I say is that even something as trivial as a checkbook program needs them. Because of that, a programmer should, at least, be familiar with a number of algorithms for them which means they should have a reasonable understanding of pointers.
However I'd suggest that the fact that the operations benefit from pointers and that pointers are tricky beasts means that searching and sorting operations should always be encapsulated: as they are of course with FPC's TStringList.
The problem is that hiding pointers has consequences, many of them really bad. Among those consequences is that there are too many programmers who don't really understand what is happening in their programs because they don't see the hidden pointers. The result is, they are much more likely to make a mistake than someone who see what is happening behind the scenes. Not too mention that the program's design will likely be "less than optimal".
<snip> which would make reference counting memory managers more tractable.
reference counting memory managers... just what a programmer needs, some "memory manager" to get in the way of the programmer's design.
Compilers shouldn't try to program... that's what a programmer is for. Compilers should generate object code that faithfully reflects what the programmer specified in the source. The road to hell is paved with compiler's good intentions.