On Sunday, 31 January 2021 at 08:07:27 UTC+11 Jens Axel Søgaard wrote:

Den tor. 21. jan. 2021 kl. 05.06 skrev Stuart Hungerford <
> stuart.h...@gmail.com>:
>
>> [...]
>> By using the Rust trait system (and later Haskell typeclasses) I could 
>> create structure traits/typeclasses that don't clash with the builtin 
>> numeric types or with the larger more production oriented libraries in 
>> those languages in the same general area of math.
>>
>> Once I added generative testing of the structure axioms I could 
>> experiment with, e.g. finite fields and ensure all the relevant axioms and 
>> laws were (at least probabilistically) met.
>>
>
> Not knowing Rust nor traits, I have amused myself writing a very simple 
> version of traits.
>  
>
> #lang racket
> (require (for-syntax syntax/parse racket/syntax))
>
> ;;;
> ;;; TRAITS
> ;;; 
>

Many thanks Jens.  This is an excellent example of Racket's 
build-your-own-abstractions philosophy at work.  (Although where I live I 
would have used bream or sharks instead of herring ;-)

If Hackett was still maintained I would probably use it too.

Thanks,

Stu




-- 
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/4bd7fad3-0c68-46c0-9504-530b3d4e3ab4n%40googlegroups.com.

Reply via email to