Carp 0.3
github.com
github.com
Pre-Scheme(https://en.wikipedia.org/wiki/PreScheme) is a GC-free (LIFO) subset of Scheme
newLISP(http://www.newlisp.org/) uses "One Reference Only" memory management
Linear Lisp(http://home.pipeline.com/%7Ehbaker1/LinearLisp.html) produces no garbage (and seems to have no implementation)
Dale(https://github.com/tomhrr/dale) is basically C in S-Exprs (but with macros)
ThinLisp(https://web.archive.org/web/20160324213055/http://www.thinlisp.org/, https://github.com/ska80/thinlisp) is a subset of Common Lisp that can be used without GC
Bone Lisp(https://github.com/wolfgangj/bone-lisp) semi-automatic memory management
list is copyed from: https://www.reddit.com/r/lisp/comments/4mtktn/bone_01_lisp_w...I looked at it a few times over the years and the domain (statically typed language with Rust-esque lifetimes for no GC) is exactly what I've wanted a few times, but there isn't any mention of embeding Carp in a program, only using it standalone. Targetting e.g. video games with low latency is fine, but I'd rather write an engine (or use an existing one!) and use Carp for scripting than be locked into solely Carp.
More generally, the language is a blast to use! IMO it grants one the fluidity and expression of lisp with the confidence one gets from a Haskellesque type system.
If you have any questions, the community on Gitter is very helpful.
A non-GC statically typed language seems to be the future a lot of people are looking for.
For example, trying to parse command line arguments ends up a bit weird because there's no 'return the command line arguments as a list/array' function, but you have to use Array.copy-map to run System.get-arg on each element of an array created by `(Array.range 0 (- @(System.get-args-len) 1))` and inferring the @s in there (a syntactic sugar for `(copy ...)` is a little confusing.
i mean what could this possibly mean? "(bg rend &(rgb (/ @state 2) (/ @state 3) (/ @state 4))))"
My team used to be a Java shop, and we switched to Clojure about a decade ago. Looking back and comparing similar types of projects that we've developed in both languages there's no contest. Clojure is much faster to develop, and far easier to maintain long term.
There are two fundamental problems with OOP. The first problem is that classes encourage creating ad hoc APIs. Every time you create a class with some methods, that's a unique API. Knowing how one class behaves tells you nothing about the next. As the number of classes grows, it becomes more difficult to understand what the system is doing because you have to keep all the unique behaviors in your head to reason about it.
The second problem is that objects are state machines. Each object has its own internal state that gets manipulated via its methods. The states of the objects are also interdependent in most cases. So, the more objects you have at runtime, the more states you have to keep in your head to know what any one piece of code is doing at any given time.
In practice, this makes it impossible to reason about code with any degree of confidence in large systems. Only thing you can do is fire up the debugger, put your application in the desired state, and then inspect it. Reasoning about code becomes a heuristic at that point. You can test it for some specific cases, and hope that it will work for all cases, but you can never really know that it will.
FP and immutability tackle both of these problems head on. Immutable data directly leads to the ability to do local reasoning about your code, and allows you to write pure functions that can be reasoned about independently. Meanwhile, data is not being abstracted inside opaque state machines that provide ad hoc DSLs as their API. Instead, it's explicitly passed through function pipelines to transform it. These aspects make the code much easier to understand and maintain because you can look at a specific part of the application and reason about its behavior in isolation.
One important lesson is that Object Orientation tends to produce a bit of conceptual dissonance in new programmers. It seems to tell you that the solution to your problem is identifying the objects you're interested in and then translating that set of objects into code. This is almost never the optimal design. Typically a completely different set of objects needs to be implemented and then composed into your program. Objects fundamental to the domain of interest may not even appear as single objects in the implementation.
A lot of what people complain about w.r.t. OO programming is just related to inexperience, in other words.
Functional programming, on the other hand, asks you to construct your program out of much more fundamentally abstract pieces. There is less of a chance that you'll naively sally forth implementing your mental model directly. To some extent, that accounts for its nice properties.
FWIW, I split my time 2:1 between C++ and Clojure these days, and the context switch to s-exprs is always easier, even though I spend less time working in them.