Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

For someone who never touched Janet, which its features are the best for gamedev? Which language can you compare it with? Also is it Lisp-1 or Lisp-2?

(+1)

It's Lisp-1. If you are interested in comparison with other lisps, the most other popular Lisp-1 I believe is Scheme. Compared to Scheme it is a lot more concise. And has polymorphic functions which work on several collections unlike in Scheme, where you have to always use the correct one, e.g. array-length, string-length.

A lot of inspiration is taken from Clojure with polymorphism and data-structures as function calls, for example, ({:a 1} :a) will print 1 since it is an access for the :a key.

It is also a compiled language, you have an option for native compilation. So unlike Clojure which is dependent on Java or Fennel which is Lua, you get both interpreted side for interactive development and compiled side for speed.

For gamedev you get cool macros as with most lisps. Then there's a good interop with C, much nicer then what you get with Fennel/Lua, you can probably inspect C code for jaylib bindings to get a taste of it.

That sounds tasty :) Will definitely give it a go (I’m a big fan of Fennel myself, even had a couple of jam submissions written in it). Although I can’t quite imagine a language more concise than Scheme, since (in my opinion) it is incredibly slick and well-designed. Still, I get your point about polymorphic collections. Thanks for your thoughts!

(+1)

I think I should elaborate a bit on the "concise" part. I don't mean that the design of the core is smaller than that of the Scheme. Although Janet was designed to be an embedded extension language as one of its use cases, I don't think its core is much smaller than Scheme, I would say it is comparable and roughly on a similar level.

But the writing is more concise in my subjective opinion. For example, you don't need extra parens for each `cond` condition, it just counts how many there are and every odd sexp is a condition, every even sexp is a corresponding action. Hash tables, arrays - very short notation for access and write. And records/objects - in Scheme it's like a tea ceremony with million rules and extensions, in Janet it's just a hash table. Many things are borrowed from Common Lisp as well (the good ones).