Rackjure
docs.racket-lang.org
docs.racket-lang.org
In some cases, it allows people who like some of the Clojure syntax to still write you libraries. In other cases it allows you to move a prototype from normal Racket to Typed Racket in a piecemeal way.
In general I like the purity of scheme as well, but sometimes that little bit of syntactic sugar goes a long way. Non-Racket Schemers use macros too, and Racket’s are second to none. Use what you want and avoid the rest!
Edit: oh, and if you _do_ like the semantics, but hate the weird name, just give it a new name that makes sense to you.
(that-macro-from-clojure ....)
it's not like clojure added that much to the list: [], {} and @
but it is lightyears ahead in convenience
https://docs.racket-lang.org/functional-data-structures/inde...
(Just to be clear: there is of course also mutable hash tables available).
It started as a Scheme R5RS implementation in Java, then I translated everything to Kotlin. Finally, decided to make it a hybrid (abomination?) of Scheme and Racket and Clojure.
Still in development, don't know how to implement macros properly. Also, it's only an interpreter for now, there is no compiler (for the same reason: don't know yet how to write a compiler for Kotlin. Use ASM?)
Anyway, it is a great and enlightening experience and I would recommend everyone to write your own lang.
Why not have one position-independent version? Something where you can specify at every level which position you want to use, like this:
(~>>> #"foobar"
(~> bytes-length)
(~>> number->string 16)
(~> string->bytes/utf-8))
But that still only limits you to first and last position. Why not use a positional special form like JavaScript has with __dirname called __var? (~>>> #"foobar"
(__var bytes-length)
(number->string 16 __var)
(__var string->bytes/utf-8))
This way you can use it no matter what functions you want. But I don't write my code in Racket so maybe this is already a solved problem.But the first/last variants, -> and ->>, are still useful because they fit a subtle design decision in Clojure. Fns that operate on objects/scalars tend to have the object modified as the very first parameter, while collection-operating fns tend to have the collection last.
[0]https://stuartsierra.com/2018/07/15/clojure-donts-thread-as
[1] https://docs.racket-lang.org/threading/index.html#%28form._%...
FTFY