Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am quite sure JOVIAL, ESPOL/NEWP, ALGOL and PL/I dialects, Lisp, which predated C in more than a decade have enough abstraction capabilities, even by their state in 1972.


citation needed

We're talking about abstract data types

Common Lisp yes, and its research predecessors, but not Lisp in 1972

CLU itself was based on Algol, and influenced C++


This tiring requests for citations...

DEFINE STRUCTURE + type functions + function/procedures is all one needs in PL/I to achieve similar workflow,

https://www.ibm.com/docs/en/epfz/5.1 (No earlier online version found)

And if you want to read PL/I documentation that uses the term "abstract data types",

https://www.ibm.com/docs/en/z-netview/5.4.0?topic=SSZJDU_5.4...

Interlisp initially created in 1970, besides the lists everyone knows, introduced atoms, string, arrays and compound data types, which alongside macros provided the necessary foundation to create abstract data types

https://www.softwarepreservation.org/projects/LISP/interlisp...

And going back to CLU,

> The language which most closely resembles, in form, the language presented here is SIMULA 67. 8 SlMULA class definitions have many similarities with cluster definitions.

"Programming with Abstract Data Types (1974)"

https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.136...


Maybe, I'm not seeing it from those links

Either way, it doesn't really matter, as it's clear that C does not include any of those ideas, and the CII style isn't idiomatic

Especially when it was created, but even today!


Yeah it doesn't, that is why there are enough papers and books how to implement them with incomplete types, and translation units with statics as poor man's replacement for modules.


Again, there is already a well known solution for this problem -- C++

And it's trivial to upgrade to from C

So basically, use EITHER idiomatic C, which means long functions / few internal interfaces, reuse with ABIs not APIs, bespoke data structures, etc.

OR use C++ and ADTs (type safety, abstraction, polymorphism). Or use Rust if you don't need compatibility.

So books like CII are of very limited use, especially not for beginners. They will be fighting with the language and not understanding what it's about.


I guess those books are for the folks that will never touch anything besides C, no matter what.

Anyway, I agree with the sentiment.




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

Search: