3 ms·
Wow, that was a trip down memory lane! I have used six of those languages: BASIC, APL, COBOL, Pascal, Algol-W (a derivative of Algol 60), PL/1. Mostly in school
by geophile 1y ago
Wow, that was a trip down memory lane! I have used six of those languages: BASIC, APL, COBOL, Pascal, Algol-W (a derivative of Algol 60), PL/1. Mostly in school. My first dollars earned in software (brief consulting gig in grad school) had me debug a PL/1 program for a bank.
For some reason I remember an odd feature of PL/1: Areas and offsets. If I am remembering correctly, you could allocate structures in an area and reference them by offset within that area. That stuck in my mind for some reason, but I never found a reason to use it. It struck me as a neat way to persist pointer-based data structures. And I don't remember seeing the idea in other languages.
Maybe the reason it stayed with me is that I worked on Object Design's ObjectStore. We had a much more elegant and powerful way of persisting pointer-based structures, but an area/offset idea could have given users some of the capabilities we provided right in the language.
- justsomehnguy 1y ago>> An area is a region in which space for based variables can be allocated. Areas can be cleared of their allocations in a single operation, thus allowing for wholesale freeing. Moreover, areas can be moved from one place to another by means of assignment to area variables, or through input-output operations. >> Based variables are useful in creating linked data struc tures, and also have applications in record inputoutput. A based variable does not have any storage of its own; instead, the declaration acts as a template and describes a generation of storage. http://www.iron-spring.com/abrahams.pdf http://www.iron-spring.com/abrahams.pdf p. 19, 74 *shrug_emoji*
- kqr 1y agoAda supports storage pools as well. In the right circumstances, it's a safer way to deal with dynamic allocation. I believe it also starts to creep into things like C#.
- elcapitan 1y agoArea-based allocation seems to be quite popular recently in game development (under the name "arena allocator"). Saw some talks referencing the concept in the "Better Software" (gamedev) conference on the weekend [1] [1] https://bettersoftwareconference.com/ https://bettersoftwareconference.com/