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

Granted, original, 1970, flavor Pascal on the CDC Cyber was very limited. I'm curious, though, what is it that Turbo Pascal 5.0 and above would prevent you from doing?

It's been a while, but if I really have to, I could cast a pointer to a long, increment it by sizeof in a loop, and cast it back to a pointer in Pascal to do pointer arithmetic in a tight loop.

I can use procedural types anywhere a function pointer in C would be used.

I can make complex constants (tables) just like a pre-initialized array of structs in C.

There is an extension to return in the middle of a function/procedure rather than toggling flags to pinball-style drop to the end of the routine.

I can set compiler pragmas to allow/force me to check for error codes after every memory and I/O call (at the risk of accidentally stumbling on to cause secondary damage), rather than just failing with a line number.

I can nest functions inside of other functions, and reference the enclosing variables, just like in GNU C (oh, wait, that's a non-standard GNU extension), even if I can't return such a function as a "use it later", honest to God closure.

What are the shackles? (I'm probably in for a face palm, oh, that, moment when I get the answer, but I'm drawing a blank at the moment)




> What are the shackles?

I think it would be supporting libraries. Looking at RedMonks's statistics[1] Pascal doesn't even feature (I was able to find ~600 on GitHub). By today's standards that's a pretty big shackle, you'd have to write a lot of functionality yourself (although that's ignoring that you can use C libraries with a little effort).

I love the language, it just had no staying power. Maybe people just prefer curly braces.

[1]: http://redmonk.com/dberkholz/2014/05/02/github-language-tren...


>> curly braces

and "wokkas"

I mean, how many XML interpreters do we really need? At least for Java, it seems like there are too many "Enterprise!!!" libraries that seem to exist to extend the lameness of the language by requiring you to write a DSL in XML.

I suppose for C there really are a lot of low level libraries that actually do things, though, such as read/write sound and graphics files, or implement useful abstract data types. Things that might seem "built in" in a 21st century language/environment, but not in C or Pascal.




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

Search: