Honestly, you're not wrong. All lists end with '() or nil depending on what you want to call it, and it's always the same, so I tend to call it the empty list as well :)
Pretty sure it is that way, and I've mostly seen '() referred to as the empty list in Scheme as well. Sure, Scheme doesn't have nil, but I'm pretty sure '() is always the same. The Guile Scheme info page for Equality only lists numbers and characters as exceptions to eq? testing reference equality. I don't know if that's how RNRS defines it, but Guile is the Scheme dialect I'm familiar with.
@boo_ @zenmaya I'm still a neophyte when it comes to Lisp, whatever the dialect. So I don't know if () is the same as nil, or whatever. The math part of my brain says yes - set theory and all that. Also, according to set theory, the empty set is a member of all sets, but I suspect that probably doesn't translate to Lisp lists. Still learning, though, and enjoying myself, as well as these conversations.
Thanks to both of you for the replies! 😃
Oh yeah, it might be a little too much at once to involve a bunch of different lisps
But yes, nil is the empty list, it's basically because the empty list is also false in Elisp, so the tendency is to use nil when you mean false, and '() when you mean the empty list, but they're the exact same. All lists contain nil at the end, so even if the rest of the list model doesn't exactly match set theory, that part does, and that connection was one of the big things that made me think Lisp was really cool when I started learning it
Happy hacking !
@boo_ @BeefGriller @zenmaya Disjunct datatypes is something that Scheme and traditional Lisps differ on: nil (or "()" via reader syntax) is a symbol, a boolean and a list, while Scheme #(), #f and 'nil are respectivly not-eq.
But it is funny to see people have the reverse struggle I had when learning mathematics: Unless I ignored it, I was usually confused why mathematicians placed such emphasis on something being "the" X. I had to engage with maths philosophy to understand it better ^^