From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Niels Giesen Newsgroups: gmane.emacs.help Subject: Re: learning Emacs Lisp Date: Mon, 10 Nov 2008 21:59:23 +0100 Organization: A noiseless patient Spider Message-ID: <87ljvrl2l0.fsf@gmail.com> References: <87k5bbjzvo.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226353253 5273 80.91.229.12 (10 Nov 2008 21:40:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Nov 2008 21:40:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 10 22:41:54 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KzeW8-0001k5-Nt for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Nov 2008 22:41:52 +0100 Original-Received: from localhost ([127.0.0.1]:60211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzeV0-0001Oi-Um for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Nov 2008 16:40:42 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news.eternal-september.org!news.motzarella.org!motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 56 Original-X-Trace: news.eternal-september.org U2FsdGVkX1/04cqnF3qCD/w6Z+mq+qBA1DY64FfbJ1BAWlpRzWwicRrI48jcxOzPmQ+YtEJ25hlPILcas8pNKH+8fMBpsPJGlVXOhLYTpn/m8QP4Sjpn+uZY1HgbHqKJikxJZBwjS/1zlSZwWOld6A== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Mon, 10 Nov 2008 20:59:25 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1/7Wq8JWQnfBDqU3skzqdHf Cancel-Lock: sha1:tdfcVthbGjzWv7Z0q34uE30fndk= sha1:fDTiCWYDk5WnG/7PagpcMz6eJ9I= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:164293 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59631 Archived-At: Richard Riley writes: [...] > Of course. But eLisp is special in that its almost unreadable to the > typical procedural programmer fluent in C/C++ etc until you know a lot > if it already. Or that was my experience. And we all have different > experiences so it does no harm to remain open as to what suits other > people. Where is there any evidence that the original OP is a `typical procedural programmer fluent in C/C++'? It annoys me to pieces that so many textbooks assume that everyone out there is a C/C++/Java programmer. For me, Lisp was my first programming language (thanks to Emacs, which I started using to write law papers in), and I do not need textbooks to explain for instance Ruby to me in Lisp (which is perfectly feasible) but I even less need comparisons with Java or C. Even worse, doing so is a major distraction from the real object of learning. Consider teaching Dutch to someone from Morocco but using English during the lessons: that's just plain silly and simply leads to unnecessary confusion. Using analogies from Slovak to teach Polish however may be insightful, but only when the student already has knowledge of a Slavic language. Same goes with programming languages: do not assume. When teaching something, teach it by itself; people willing to learn a new language are most likely not stupid, and if they are somewhat smart, they will find out for themselves what differences and similarities there are between languages known already. For me, it would have been nice when learning JavaScript if the books had warned me that not everything is an expression (invalid left-hand assignment anyone?), that you have to explicitly return something, that there are things such as keywords, and it would be nice if textbooks explain how to take advantage of closures instead of trying to get rid of them, hide them, and how to build an ugly half-assed Class system. The first few of those would cause people coming from C or Java at least to frown but most probably to get irritated ("Why would I care about all these strange incomprehensible things from some dead language with too many parens, when all I want to do is simply to learn JavaScript?????"). Therefore, I would not recommend such in a learning text on JavaScript. The second however, how to make good use of lexical scoping, is interesting to learn, and should be explained by itself, as should be prototype based inheritance and functions as first-class things (two of which could - but should not - be explained by comparison with Lisp). Comparisons with Java-style OOP however should not be in a basic textbook on learning JavaScript, and certainly no attempt should be made to mimic it -- for the very same reasons that comparisons with Lisp should not be made in a general textbook.