3 ms·
The BBC computers had a pascal compiler that was about 5K if I remember. It lacked quite a lot though, like records I think, enumerations & more, but had nestab
by throwaway_pdp09 7y ago
The BBC computers had a pascal compiler that was about 5K if I remember. It lacked quite a lot though, like records I think, enumerations & more, but had nestable procs/funcs so wasn't too far off the language in other ways. Never used it BTW.
One thing I liked about pascal but missed in every language since is the ability to have arrays start from arbitrary values. It can be fudged in C/C++ pretty easily but still, be nice to have it built into languages like java/scala/so many more.
- badsectoracula 7y agoAnother nice feature is sets and ranges, so you can have something like type Day = (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); Days = set of Day; const Weekdays = [Monday..Friday]; ... if Today in Weekdays then ... ... Sets are essentially bit flags but they look much better than a series of #define MONDAY 0x0001 #define TUESDAY 0x0002 etc. IMO, of course :-P.