Hacker News new | past | comments | ask | show | jobs | submit login

no, it has exactly the same issues as c and c++, and some of its own, such as arrays of different sizes being different types. guess why it isn't used anymore



Arrays of different sizes are different types in C, as well - this is obvious when you are dealing with pointer-to-array types.

That aside, Pascal removes a lot of UB and other footguns by forcing explicitness for e.g. casts and pointer arithmetic, or providing (verifiably safe) byref argument separately from raw pointers. Strings and arrays are a mess in standard Pascal, which is why everybody used dialects that solved them - most notably Borland's, of course, which was used for a lot of DOS and early Win32 software.

Anyway, I'm not suggesting Pascal specifically today. The point is that C and C++ were never good teaching languages, which is why something else was usually used as one whether we look at 80s, 00s, or today.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: