From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add ob-sclang.el for sclang Org-mode babel support in contrib/ Date: Sun, 18 Jun 2017 22:37:25 +0200 Message-ID: <87a855c9ru.fsf@nicolasgoaziou.fr> References: <87ink4z27l.fsf@nicolasgoaziou.fr> <87y3suis4y.fsf@nicolasgoaziou.fr> <87wp8dpgsf.fsf@bzg.fr> <87fuey28ch.fsf@bzg.fr> <87bmpmg058.fsf@nicolasgoaziou.fr> <87mv95ofs4.fsf@bzg.fr> <87injtd4mb.fsf@nicolasgoaziou.fr> <87wp89rsfe.fsf@bzg.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMgwt-0004sW-9u for emacs-orgmode@gnu.org; Sun, 18 Jun 2017 16:37:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMgws-0006GS-Cz for emacs-orgmode@gnu.org; Sun, 18 Jun 2017 16:37:31 -0400 In-Reply-To: <87wp89rsfe.fsf@bzg.fr> (Bastien Guerry's message of "Sun, 18 Jun 2017 21:45:25 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Bastien Guerry Cc: Org-mode Bastien Guerry 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,