emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Add ob-sclang.el for sclang Org-mode babel support in contrib/


From: Nicolas Goaziou
Subject: Re: [O] Add ob-sclang.el for sclang Org-mode babel support in contrib/
Date: Sun, 18 Jun 2017 22:37:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Bastien Guerry <address@hidden> writes:

> I agree it's good to have lexical scoping, but I don't consider Elisp
> to be lexical scopped -- I consider Elisp to let the user pick up the
> constraints he wants, with dynamic binding still being the default.

Not at all. Lexical binding is still the way to go. If you need dynamic
binding, use a global variable, e.g., a defvar, so at least this is
explicit.

> Maybe lexical binding will be the default behavior one day, but in the
> meantime, I would suggest to use "-*- lexical-binding:t ; -*-" only if
> lexical binding is actually used in the file.

This is really not a good idea. Firstly, if lexical-binding is nil, no
code can use it (obviously). You will not get a warning saying "Hey,
your code would really benefit from lexical binding", either. You really
don't want to ponder about it at every non-trivial change you make in
the file. Secondly, when active, the compiler can reason (a bit) about
the code and report more informative errors. The code is more readable,
and therefore easier to debug, too.

There is absolutely no drawback in using lexical binding. Since Emacs
24.1, it _is_ the default for Elisp: every Elisp file created activates
it, the other binding being for compatibility with older libraries.
Please, pretty please, don't suggest it is different.

Regards,



reply via email to

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