From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs contributions, C and Lisp Date: Thu, 08 Jan 2015 04:38:56 +0100 Message-ID: <878uherlf3.fsf@wanadoo.es> References: <83bnxuzyl4.fsf@gnu.org> <8761nusb90.fsf@uwakimon.sk.tsukuba.ac.jp> <87vbkovhh7.fsf@engster.org> <87387rvobr.fsf@engster.org> <83ppat84hk.fsf@gnu.org> <20150106143933.0090bc83@jabberwock.cb.piermont.com> <83r3v77ij6.fsf@gnu.org> <20150106154539.3d0752c4@jabberwock.cb.piermont.com> <87wq4ype3z.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1420688394 26734 80.91.229.3 (8 Jan 2015 03:39:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2015 03:39:54 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 08 04:39:48 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Y93wX-0003WM-Lh for ged-emacs-devel@m.gmane.org; Thu, 08 Jan 2015 04:39:29 +0100 Original-Received: from localhost ([::1]:43903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y93wW-0003Xx-Tb for ged-emacs-devel@m.gmane.org; Wed, 07 Jan 2015 22:39:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y93wT-0003Xo-HG for emacs-devel@gnu.org; Wed, 07 Jan 2015 22:39:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y93wP-0000fa-3K for emacs-devel@gnu.org; Wed, 07 Jan 2015 22:39:25 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:54083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y93wO-0000fS-Tc for emacs-devel@gnu.org; Wed, 07 Jan 2015 22:39:21 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y93wH-0002H8-QQ for emacs-devel@gnu.org; Thu, 08 Jan 2015 04:39:13 +0100 Original-Received: from 129.red-88-10-128.dynamicip.rima-tde.net ([88.10.128.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Jan 2015 04:39:13 +0100 Original-Received: from ofv by 129.red-88-10-128.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Jan 2015 04:39:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 129.red-88-10-128.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:fqewqr8xLO5jFyr9kaXrJRpP/Vo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181045 Archived-At: Richard Stallman writes: [snip] > Eli tried to explain > > > In an object-oriented language that supports operator overloading, the > > + or - can do anything, and accept only specific data types under > > certain constraints. For example, if foo.x is of a certain data type, > > the candidates for the right-hand operand might be restricted to a > > small subset of what a + or a - can generally support. If you > > complete to a large list of candidates here disregarding the > > constraints, you'd leave a lot of users unhappy. > > but he didn't give the substance, so I still don't follow. > > I have never used C++. Possibly this explanation is more familiar to you: C++ has type deduction for declarations: auto some_var = foo(bar); and when the compiler resolves `foo' it can choose an overload depending on complex attributes of `bar' (such as if `bar' is an instance of a class that implements certain method.) As each overload can return a different type, only a C++ compiler can know which type `some_var' finally is. This way C++ is a bit like Lisp. In fact, the latest C++ standard requires the existence of a compile-time interpreter that covers a fair subset of the C++ language. The same way that it is useful to inspect Lisp from an IDE, a C++ IDE can benefit a lot from doing that. Actually, it can benefit more than Lisp, because the presence of types (explicit or implicit) provides rich information that allows fine-grained features such as batch code transformations and real-time code analysis. [snip]