bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26221: (define function nil should work in 2.2


From: tomas
Subject: bug#26221: (define function nil should work in 2.2
Date: Fri, 24 Mar 2017 10:19:25 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Mar 23, 2017 at 07:59:04PM +0000, Joshua Branson wrote:
> 
> I can confirm this bug.  Eshell accepts (defun hello nil (print “Hello"))  
> And (hello)  works properly.
> 
> M-x guiler
> 
> ,languages elisp
> 
> (defun hello nil (print “Hello”))  doesn’t work.
> 
> Joshua
> 
> P.S.  I didn’t even know (define function nil …) was a thing in elisp land.

No, no. It's not (defun nil) -- it's (defun foo nil ...), which, if you squint a
bit is the same (in Lisp!) as (defun foo () ...) -- defining function foo with
an empty argument list. This is a perfectly respectable thing to do.

That's because, for Lisp, nil, '() and false are all one and the same. Scheme
is pickier here, and I'd imagine that this is the reflection of one of those
translation pains. But I don't know enough about Guile's elisp implementation
to be sure (ah, I wish I had the time for that...)

regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAljU5J0ACgkQBcgs9XrR2kY2SACffmA4jJ06fft6EBCbhm3m7Zwj
8Y8AnitudhEOZQjCzsa/tu29vFtNEFhZ
=0umF
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]