Ramin Honary on Nostr: I tried using Marc Nieper-Wißkirchen’s Scheme pattern matcher It’s called (rapid ...
I tried using Marc Nieper-Wißkirchen’s Scheme pattern matcher
It’s called (rapid match), and it is part of the “Rapid Scheme” compiler project, which is a Scheme compiler written in portable, standards-compliant R7RS “small” Scheme.
It is tiny, only 300 lines of code, and compiles almost instantly. But it lacks features that other pattern matchers might have, especially matching on record data types, becuase the R7RS “small” standard does not provide any mechanism for introspection of record data.
But it is efficient, and it gets the job done. It will probably cover 80% of all use cases. It’s best features are portability and it’s small footprint. I have decided to use it in my Gypsum software.
I also discovered that unfortunately Guile Scheme does not fully implement the R7RS standard for library definitions, it is missing the (export (rename from-sym to-sym)) declaration syntax. But I was able to work around it and get (rapid match) to build on Guile.
#tech #software #SchemeLang #Scheme #R7RS #GuileScheme #Guile #FunctionalProgramming #PatternMatching
It’s called (rapid match), and it is part of the “Rapid Scheme” compiler project, which is a Scheme compiler written in portable, standards-compliant R7RS “small” Scheme.
It is tiny, only 300 lines of code, and compiles almost instantly. But it lacks features that other pattern matchers might have, especially matching on record data types, becuase the R7RS “small” standard does not provide any mechanism for introspection of record data.
But it is efficient, and it gets the job done. It will probably cover 80% of all use cases. It’s best features are portability and it’s small footprint. I have decided to use it in my Gypsum software.
I also discovered that unfortunately Guile Scheme does not fully implement the R7RS standard for library definitions, it is missing the (export (rename from-sym to-sym)) declaration syntax. But I was able to work around it and get (rapid match) to build on Guile.
#tech #software #SchemeLang #Scheme #R7RS #GuileScheme #Guile #FunctionalProgramming #PatternMatching