Re: [racket-users] Historical note.

2020-11-09 Thread jackh...@gmail.com
I'm glad, I didn't expect my comment to be so helpful :)

For those curious, I have several examples of this pattern in Rebellion. 
The following constructs are all just structs of functions:

   - Comparators 
   - Converters 
   - Equivalence relations 
   
   - Reducers 
   - Transducers 

On Monday, November 9, 2020 at 2:03:52 AM UTC-8 unlimitedscolobb wrote:

> 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  
>> 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 racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/15dc0d41-dbd2-488a-9113-31c284443ce4n%40googlegroups.com.


Re: [racket-users] Historical note.

2020-11-09 Thread unlimitedscolobb
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  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 racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/2fa2c643-04cd-4b59-9842-c68913124505n%40googlegroups.com.


Re: [racket-users] Historical note.

2020-11-08 Thread Kieron Hardy



> On Nov 8, 2020, at 2:58 PM, Hendrik Boom  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.
> 
> -- hendrik
> 
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!

— Kieron

-- 
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 racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/ADDB8BD2-9A4B-478E-B296-7EF44392466A%40gmail.com.


[racket-users] Historical note.

2020-11-08 Thread Hendrik Boom
On Sun, Nov 08, 2020 at 12:47:11PM -0800, unlimitedscolobb wrote:
> Thank you for you answer!  I'll need to think more about it.  The idea of 
> having structs whose fields contain functions has never occurred to me, but 
> it may actually fit my relatively simple use case (and the planned 
> migration to Typed Racket).

Historical note:

I first encountered structures containing function in the source code for
OS/360 way back in the late 60's.  In assembler.

-- hendrik

-- 
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 racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20201108215826.sxdlxmult3teo6a3%40topoi.pooq.com.