3 ms·
Object Pascal (not the original Pascal) versions like Delphi and Free Pascal have syntax and semantics for interface and implementation sections of the module.
by fuzztester 2y ago
Object Pascal (not the original Pascal) versions like Delphi and Free Pascal have syntax and semantics for interface and implementation sections of the module. Wouldn't be surprised if Modula-2 and Ada had that too.
- wruza 2y agoI remember int/impl sections since the 1990’s turbo pascal, which wasn’t “object” still, iirc. Also, commercial closed-source units (modules) were often distributed in a .tpu/.dcu + .int form, where .int was basically its source code without the implementation section.
- fuzztester 2y agoInteresting. Yes, I remember the .tpu and .dcu filename extensions. IIRC, .tpu stood for turbo pascal unit, and .dcu may have meant delphi compiled unit, not sure of the latter. I don't remember the .int extension, but it would have been there, of course, if you say so. What was the use of the .int file?
- wruza 2y agoIt was literally the unit with implementation part just missing. Sort of a header that you can just read(?). Idk if it played a role in compilation, probably not. But some commercial libraries packaged them as well. Here, look at this random repo: https://github.com/keskival/turbo-pascal-experiments/tree/master/UNITS https://github.com/keskival/turbo-pascal-experiments/tree/ma... -- few int files at the end of a list. This page mentions a few ints without any context: https://comp.lang.pascal.borland.narkive.com/1B3WeJkX/rebuild-of-turbo-pascal-exe-missing-tpu-modules https://comp.lang.pascal.borland.narkive.com/1B3WeJkX/rebuil... This guy seems to package ints for documentation purposes: https://www.wrotniak.net/hplx/lxtpgr.html https://www.wrotniak.net/hplx/lxtpgr.html Man this is nostalgic... T-T
- fuzztester 2y agoGot it, thanks.
- pjmlp 2y agoThat was inherited from UCSD Pascal, and also incorporated into ISO Extended Pascal, which was supposed to be a more industry friendly revision of ISO Pascal, but by then Object Pascal was the de facto standard. Modula-2 modules are based on Xerox Mesa, and do have split sections, as does Ada. Additionally, Modula-2 and Ada modules/packages have a powerful feature that is seldom used, multiple interfaces for the same module implementation, this allows to customise the consume of a module depending on the customer code.