Comment by nsm

3 years ago

Could someone compare Janet with Racket? The latter is a much more mature project with a powerful and well designed standard library, so I'm not sure why one would pick Janet.

I see the appeal to embed in another app as a scripting language like Lua, but for writing standalone programs?

Mm, I don't think it makes a lot of sense to compare Janet and Racket. They're so different that they aren't really bidding for the same projects -- you could ask the same question about Janet and Python, or Janet and Ruby, or Janet and Erlang. They aren't really substitutes for one another -- a comparison with Lua or Tcl makes more sense. That said, I think the original article serves as a decent starting point -- how many of the listed points apply to Racket?

  • That is fair, I agree they don't bid for the same projects.

    In terms of listed points.

    1. Simplicity... perhaps? I guess Racket has a larger surface area, but just like all Lisps/Schemes it is built on a simple core. 2. Distribution. Janet probably wins here. Racket can produce static binaries, but they may not be as tiny. Relatedly, there is a Racket subset, Zuo, that ticks this box. 3. Parsing text - Racket's whole shtick is this, given it is a language for writing languages :) 4. Subprocess DSL. `sh` looks like a nice library. I can see the value for using this for quick scripts since you can shell out to bash whenever you want. 5. Embeddable. Janet is better here similar to Lua. Also see Zuo. 6. Mutable and immutable collections. Racket has these. 7. Macros. Racket has these. 8. Compile time to run time. I'm not sure about this, being a Racket newbie. 9 and 10 - very subjective :)

    Cheers! Thanks for the great article!

    https://docs.racket-lang.org/zuo/index.html

    In some sense it is a little sad that the Lisp and Scheme like languages diverge so much within themselves, as it makes an already unpopular set of languages even harder to standardize on and evangelize.