If you are creating Lisp because you want to create Lisp, like creating Lisp, want to show off creating Lisp, that obviously is not what the Law is about.
Furthermore, if you create Lisp because you know the Law, know it is inevitable, and want to avoid the caveats and missed bars by doing so explicitly, well then that also is not what the Law is about.
But if you are going about your business, focused on your independent goal, realize you need Lisp like lists, and then 250 lines of code later realize you have created a solid Lisp unintentionally? Well, congrats on falling into the trap but not getting hurt!
—
Personally, I have created both Lisp and Forth multiple times for suitable projects where I wanted some flexible runtime scripting. I am not familiar with the standard version libraries of either and don’t need them.
Minimal foundation implementations are extremely easy to create, and eliminate any dependencies or sources of mystery.
Anyone know of any other well designed mininal languages?
I've no idea why they don't introduce car/cdr functions and nil for empty parameter packs and allow to store parameter packs instead of the current syntax insanity.
C++ templates are a lambda calculus, there's no notion of memory cells or state.
template <typename Result, typename Head, typename ...Tail>
struct Foo : Visitor {
Result res;
UntypedList lst; // This does not exist!
Tail... tail; // This is not possible!
Foo(UntypedList l; Head hd, Tail... tl) : lst(l), tail(tl) {
hd->accept(*this);
}
void visit(float *f) {
res = Foo<Result, Tail...>(append(lst, f), tail)::res; }
}
};
// Base case that calls the multimethod omitted.
There are two issues here: You can't store the parameter pack in Foo() which is later required by the continuation in visit(). And you would have to use tuples and tuple_cat() instead of UntypedList.Why can the compiler not infer the types in such an UntypedList? Why is there no car/cdr for tuples?
If you want a cons-based tuple, boost::tuple will work just fine (or you can implement your own, it is not hard). std::tuple is not (visibly) cons based.
"Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp."
HA HA!
But what is "sufficiently" complicated? Now it's a silly statement that just doesn't pass Popper criterion: even if nobody dares to deny your program is complicated, one can always say it isn't sufficiently complicated, hence the fact it doesn't contain Lisp-interpreter disproves nothing. A man of culture wouldn't use such definitions.
I think what makes it work is that Common Lisp very quickly becomes a faster way to do things because of how insanely efficient it is.
Famous use of that pattern is Arthur's Clarke "Any sufficiently advanced technology is indistinguishable from magic.". As with OP's quote, this is also vague and imprecise but the point of the idea is that there is a gradient towards which advancements in technology bring us towards a situation where the average person no longer understands how it works and it may as well be magic (while not necessarily defining exactly when does that transition happen)