News for hackers. Stuff that matters.
Re:Ask HN: What languages teach the wisdom of C without the ... by AnimalMuppet on Friday February 15, 2019 @11:16PM (#19177029)
If you find Pascal and C equally confusing using pointers, then maybe the problem is that you find pointers confusing, not so much the language.

Pointers are not very intuitive. You have to have a clear mental picture of what you're doing, and think very carefully about each step to make sure that you're doing what you think you are. I'm not sure that any language can save you from that. C might actually be better than Pascal, though, because it does less to try to hide what you're doing from you. On the other hand, Pascal does more about trying to keep you from doing something stupid.

Re:Ask HN: What languages teach the wisdom of C without the ... by philonoist on Saturday February 16, 2019 @10:12PM (#19182481)
I must clarify that I am asking if pointers are just as much confusing in Pascal.

Thanks for the comment!

Re:Ask HN: What languages teach the wisdom of C without the ... by AnimalMuppet on Saturday February 16, 2019 @11:14PM (#19182648)
I think I would say that no, they are not quite so confusing in Pascal, because they are more limited. (At least, they were in the original Pascal. I have no experience with the more modern versions.) As a result, you couldn't do some of the things that you can do in C, which made it easier to understand the uses of pointers in existing Pascal code. (On the other hand, if you were trying to get pointers to do something in Pascal, and that thing was outside the range of what you could do with pointers in Pascal, then Pascal could be very frustrating...)