From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: gmane.emacs.help Subject: Re: Emacs history, and "Is Emacs difficult to learn?" Date: Thu, 01 Aug 2013 20:40:51 +0200 Organization: Informatimago Message-ID: <877gg5s18s.fsf@informatimago.com> References: <87y58pplcp.fsf@VLAN-3434.student.uu.se> <87fvuwgsv0.fsf@VLAN-3434.student.uu.se> <075751cf-97a3-4d01-8fb1-4ffbc0180f3f@googlegroups.com> <878v0oxfdw.fsf@VLAN-3434.student.uu.se> <87a9l4rs76.fsf@VLAN-3434.student.uu.se> <39e6407d-c4fd-4dc1-b47f-a1ba4119c7cb@googlegroups.com> <87iozqzjjq.fsf@VLAN-3434.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375382716 29171 80.91.229.3 (1 Aug 2013 18:45:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Aug 2013 18:45:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 01 20:45:20 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V4xsF-0003iO-5W for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Aug 2013 20:45:19 +0200 Original-Received: from localhost ([::1]:60593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4xsE-0004tv-Pc for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Aug 2013 14:45:18 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 56 Original-X-Trace: individual.net PUTkuhf33gNPpQidZNa43wYvjwXMEqvNur5Wk30EhbXVdTCXqi Cancel-Lock: sha1:MzllZDJmZTI4OWQzNTBjNmFlYjkzYmYzMzE1YzZlMDRjMTVmNGNiZg== sha1:4l/+/k4D7KM0ZzlYUP1vGGPnq/M= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:200372 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92639 Archived-At: Emanuel Berg writes: > Note that there is no "C/C++". Those are two different languages, > with different tools, and with different libraries. In the same way there's no scheme/emacslisp or emacslisp/common-lisp languages, but you can still write programs that run on both scheme, emacs lisp and common lisp! http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/intersection-r5rs-common-lisp-emacs-lisp/ Oh, and there's no csh/fortran or fortran/c, but you can still run this program on both sh, csh, fortran and C: https://groups.google.com/forum/#!msg/comp.lang.lisp/i7CpbNGueXw/jZ5Hhk1iUO4J But honestly, it's with C and C++ that you can write functions that are identical and that will compile in both languages into the same semantics, without adding any compatibility layer. Even for emacs lisp vs. common lisp you need at least (require 'cl), and I don't say the macrology required to run scheme in CL or CL in scheme, just check the first url above. [pjb@kuiper :0.0 ~]$ g++ -Werror -Wall -c -o f_c++.o f.c [pjb@kuiper :0.0 ~]$ gcc -Werror -Wall -c -o f_c.o f.c [pjb@kuiper :0.0 ~]$ cat f.c int f(int x){ return((0==x) ?1 :(x*f(x-1)));} [pjb@kuiper :0.0 ~]$ With lisp, you'd have at least to define a macro: (defmacro define ((fname &rest lambda-list) &body body) `(defun ,fname ,lambda-list ,@body)) to be able to read and run: (define (f x) (if (= 0 x) 1 (* x (f (- x 1))))) in both emacs lisp, common lisp and scheme. Therefore here you could rightly argue that there's no scheme/common lisp, but two languages. But not for C/C++, I don't think so. -- __Pascal Bourguignon__ http://www.informatimago.com/ A bad day in () is better than a good day in {}. You know you've been lisping too long when you see a recent picture of George Lucas and think "Wait, I thought John McCarthy was dead!" -- Dalek_Baldwin