Conversation
Notices
-
@natecull I think it's an arbitrary (guided by the language culture's philosophy) choice that many programming languages have had to make over the years. Some languages (Objective C) have their NIL respond to any message with a NIL. Other languages (Scheme, Smalltalk) may respond to some messages, not to others, and may throw exceptions[0].
#PicoLisp has a philosophy that is very pragmatic: "It is easy to produce a segfault in PicoLisp."[1], so I think the liberal choice seems entirely appropriate.
Only a design error will be negatively affected by "infinite NIL", and an infinite recursion because you forgot the base case is usually discovered pretty early in your development.
[0] Guile: "Wrong type argument in position 1 (expecting pair): ()"
[1] http://www.software-lab.de/doc/faq.html#segfault
-
@icefox @natecull It's a thing because you only need a handful of people using and developing it for it to be a thing. And people talk about it because it's a niche of its own, connected to and separated from both Forth and other LISPs, and it makes a novel set of choices in its design.
It's tiny, yet it has all these batteries included. It's not compiled, but it's so thin that it can still have pretty good performance if you don't do a lot of heavy lifting within the language itself. Of course if you're I/O-bound, performance doesn't matter.
-
@natecull @icefox I haven't played with it, but the way I understand it is that #pilog is more of a #datalog rather than a full #prolog with higher-order reasoning? (meaning it always terminates)
-
@natecull @icefox PicoLisp is not logically sound. It's pragmatic.
-
@natecull @icefox Sound, correct, practical ... Maybe it's possible, but you'll have to put dozens of the sharpest minds in academy and industry on it. You will get Rust, D and Haskell, and you still won't be able to express every correct program, or you'll have to put a lot of effort into expressing it.
If you build it with explosives you can build the next one the next day. It depends on your use case. The Mars rover won't be using PicoLisp.
-
@natecull @icefox
... but it might be using Common LISP?
SBCL:
> * (cdr NIL)
> NIL
-
@natecull @icefox I was going to say "no problem, that sublist is in (car)", but apparently (eq (car NIL) NIL) too, so that's something I find genuinely disturbing. That means, if you want to store NIL, you'd have to use a stand-in value. :-(
-
@natecull @icefox This is not about equality as such, it's about the equality of behavior in the car/cdr interface.
It's just like how in Python, "characters"[0] == "characters"[0][0] . It doesn't mean anything deep about the identity of the character "c", it just means the subscript method on characters is wonky because of the lack of a character type.
-
@natecull @icefox Ok, so it does mean the character "c" is not a character in its own right, which is, I suppose, a semi-deep reflection on its identity. :-D
-
@natecull @icefox I don't believe for a minute that the interaction between car and NIL is the weirdest thing in CL. :-)