On Monday, November 9, 2020 at 1:51:05 AM UTC+1 Kieron Hardy wrote: > > > On Nov 8, 2020, at 2:58 PM, Hendrik Boom <[email protected]> wrote: > > > >> On Sun, Nov 08, 2020 at 12:47:11PM -0800, unlimitedscolobb wrote: > >> The idea of having structs whose fields contain functions has never > occurred to me ... > > > > Historical note: > > > > I first encountered structures containing function in the source code > for > > OS/360 way back in the late 60's. In assembler. > > > Structures with fields containing functions has never occurred to me > before, either, at least not in those terms. > > However isn’t that exactly one of the key design principles behind how > device-drivers are implemented and installed into an OS? And also how > classes and objects were initially added to C as some pretty hairy #define > macros and function pointers? > > This design pattern insight would have been beneficial to me sooner - doh! > > I completely share your feelings Kieron. In fact, I have already defined structures with functions in the fields multiple times and in many programming languages, but I have never thought how this pattern could be used to implement generic-like functionality :D
Thank you Hendrik for the historical note! - Sergiu -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/2fa2c643-04cd-4b59-9842-c68913124505n%40googlegroups.com.

