From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?Jostein=20Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.devel Subject: Re: Include modern-cpp-font-lock into GNU Emacs Date: Mon, 20 Aug 2018 19:54:16 +0200 Message-ID: <1534787656.2221947.1480287024.78B80C56@webmail.messagingengine.com> References: <53cad8eb-9bf1-e2d3-90cf-10a9874bf69b@lud.cc> <20180811145124.GA4992@ACM> <4e10dfa3-4793-f680-8a85-78a489884cad@lud.cc> <866005o2ko.fsf@gmail.com> <1534757322.75605.1479728696.2BF2BB66@webmail.messagingengine.com> Reply-To: jostein@kjonigsen.net NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_----------=_153478765622219472" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1534787576 6586 195.159.176.226 (20 Aug 2018 17:52:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 20 Aug 2018 17:52:56 +0000 (UTC) To: Andy Moreton , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 20 19:52:51 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1froMF-0001cn-9u for ged-emacs-devel@m.gmane.org; Mon, 20 Aug 2018 19:52:51 +0200 Original-Received: from localhost ([::1]:48457 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1froOL-0003fM-NY for ged-emacs-devel@m.gmane.org; Mon, 20 Aug 2018 13:55:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1froNi-0003f1-Fq for emacs-devel@gnu.org; Mon, 20 Aug 2018 13:54:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1froNe-0002gj-Su for emacs-devel@gnu.org; Mon, 20 Aug 2018 13:54:22 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:55853) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1froNe-0002g9-Ao for emacs-devel@gnu.org; Mon, 20 Aug 2018 13:54:18 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B43A221D23; Mon, 20 Aug 2018 13:54:17 -0400 (EDT) Original-Received: from web4 ([10.202.2.214]) by compute6.internal (MEProxy); Mon, 20 Aug 2018 13:54:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :reply-to:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=DrAqQWL5cUnadzOGHOI5pEvjhurD2RgIpef4BgyKJN0=; b=LTmRQ2N7AmQK W5+9MsZfJLfSNKUTGIYS4BMwIUNJ2dn4Zau7eVS0rnqZlXUYpbPgEoTRKSd80qiO uFTzLjxS106m9Mi7LXCjGXejjJ+9vL1fte1yJ5+uMx8c1v4c4cqUHNQ/6Fr4l/PN JuxJjK3HicLQ5WTVfGgHOoqhhpVXVRQorxCg+tkfDNZ5TqxIRrwKU/4FOW3dYBfb a0f1Kqe0jeNBcbbALinYGJLbgW8+d/7jWp0ujO3d4+6FFNCDj9f8is8QqAto6tdS FhQWijbFfzePhSaUcp6nBmO1/MbIiN+Qo3+9pJUcjBc4qPDjVcQEfckWhbeTGEv6 8wzhJdfxlg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :reply-to:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=DrAqQWL5cUnadzOGHOI5pEvjhurD2RgIpef4BgyKJN0=; b=I2q3NrbVkwdS gJvrP8xp88q0+t8KP0RYqvydpbM0s9Uj9JwSWNfGwr+o+BgeKIe2DxK+PXdm2mYd 5Mm1nZd/lxaQPofcARolby8QHzxWn6lVacGzC0d08f6YlAfXkCXTfD9VLchmWBC/ CZVdUz9YTm7KcXgEUtuUdXtQ+oVpgNf1PmSfU+LlcNs9zJ0edDuj/U6X//jg3hCi EZLOp5KR8q2eLeIV3Cso4eLYAYLj9ZHWUlIeiCk1UOVvK8ygMIiDDpOZPR+AwnqT iG3SrAoWNwGb7LS9G/OtQ4ChNhLLlz59190ymKJ0Lyn5xv7Evj8FJJeDFMOxWKEx wVGSp1zt9Q== X-ME-Proxy: X-ME-Sender: Original-Received: by mailuser.nyi.internal (Postfix, from userid 99) id ECCB4BA4CF; Mon, 20 Aug 2018 13:54:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface - ajax-7b72137a In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.25 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:228755 Archived-At: This is a multi-part message in MIME format. --_----------=_153478765622219472 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Mon, Aug 20, 2018, at 1:28 PM, Andy Moreton wrote: > On Mon 20 Aug 2018, Jostein Kj=C3=B8nigsen wrote: >> As I've mentioned in another reply on this subject, decoupling >> cc-mode>> releases from Emacs-releases will make it harder for third-par= ty major->> modes deriving from cc-mode to maintain compatibility when cc-m= ode >> introduces breaking changes. >> Currently we can inspect "cc-mode version" by checking emacs-version,>> = and dispatching compatible code based on that. >=20 > Checking version numbers is the wrong approach for feature detection,> an= d should only be a last resort if checking behaviour is not > practical.>=20 > If an ELPA package results in more frequent updates to cc-mode then > third party extension authors will simply have to adapt to a slightly> fa= ster release cadence. >=20 > AndyM >=20 Agreed, but (to my knowledge) Emacs lacks proper introspection capacities, and there's no way up front to know if a function requires 3 or 5 parameters until you've called it and your code has crashed. Compared to that, verifying version numbers against known points of change seem like a much better strategy. It is also the advice I've received from other people around in the Emacs-community. -- Regards Jostein Kj=C3=B8nigsen jostein@kjonigsen.net =F0=9F=8D=B5 jostein@gmail.com https://jostein.kjonigsen.net --_----------=_153478765622219472 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"
On Mon, Aug 20, 2018, at 1:28 PM, Andy Moreton wrote:
On Mon 20 Aug 2018, Jostein Kj=C3=B8nigsen w= rote:
As I've mentioned in another reply on this subject, decoup= ling cc-mode
releases from Emacs-releases will make it harder for third-party major= -
modes deriving from cc-mode to maintain compatibility when cc-mode
=
introduces breaking changes.
Currently we can inspect "cc-mode version" by checking emacs-version,<= br>
and dispatching compatible code based on that.

Checking version numbers is the wrong approach for feature detection,<= br>
and should only be a last resort if checking behaviour is not practica= l.

If an ELPA package results in more frequent updates to cc-mode then
third party extension authors will simply have to adapt to a slightly<= br>
faster release cadence.

    AndyM


Agreed, but (to my knowledge) Emacs lacks proper introspecti= on capacities, and there's no way up front to know if  a function requ= ires 3 or 5 parameters until you've called it and your code has crashed.

Compared to that, verifying version numbers against known points of ch= ange seem like a much better strategy. It is also the advice I've received = from other people around in the Emacs-community.

--
Regard= s
Jostein Kj=C3=B8nigsen




--_----------=_153478765622219472--