Hello,

i released Scheme+ for Guile version 9.1:

https://github.com/damien-mattei/Scheme-PLUS-for-Guile

It is a big refactoring of code,now completely implemented with modules and
still use syntax transformers.

It add very few new features but it is a complete refactoring of the code
presentation using modules. (instead of mixed included/imported files of
the previous releases)

I use the Guile modules instead of R*RS (that have little problem in
current version of Guile)

Scheme+ add a lot of "syntactic sugar" to Scheme : infix with precedence
operator, [ ] square bracket notation for indexed objects (vector, arrays,
strings,...), and much more i can not describe in a short message.

Here is a limited (not all) overview of the modules dependencies focusing
on the infix and square bracket SRFI 105 interaction:

[image: schema-scheme+.jpg]

So now we can use all features of Scheme+ or only load what we want module
by module.

Examples:

to use operator precedence in infix:

scheme@(guile-user)> (use-modules (nfx))
scheme@(guile-user)> {3 * 5 + 2}
$1 = 17

to use square bracket with vectors,strings,hash tables, arrays,etc ... :

scheme@(guile-user)> (use-modules (bracket-apply))
scheme@(guile-user)> {#(1 2 3 4 5)[2]}
$2 = 3

scheme@(guile-user)> (use-modules (slice))
scheme@(guile-user)> {"hello"[0 : 5 : 2]}
$4 = "hlo"

scheme@(guile-user)> {"hello"[: : -1]}
$5 = "olleh"

(this slicing syntax is same as Python syntax adapted to Scheme, with a few
differences inherent to Scheme/Python objects differences)

I will  describe slowly and more precisely in other messages each one of
the features of Scheme+ in the next weeks.

Regards,

Damien

Reply via email to