Re:Why Pascal Is Not My Favorite Programming Language (1981)
by clouddrover on Monday February 25, 2019 @07:11AM
(#19245046)
> This is hiding that what really happens
There is no ambiguity and nothing is hidden. Both examples are passing a reference to the procedure and all Pascal programmers will know what it means.
I think your argument boils down to a lack of experience with Pascal (which is fine). But these things you think are problems simply aren't.
Add to that the unfounded non-orthogonality (like in C++, references are technically the same as pointers, but not syntactically, and not in the type system, leading to combinatorial explosion. And of course the bloated standard library is proof).
Furthermore this approach doesn't work for pointers that point to arrays. Again, Delphi has its own zoo of workarounds that OOP enthusiast will think are so much better -- from dynamic arrays (really weird interactions with reallocations combined with "var" modifier or not), to ObjectLists (not typed) to a version of generics (has its own technical problems). But what I want is the simple and obvious thing (pointer parameters without typedefs) and there's no good reason why we shouldn't have it.