Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76008 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91346 invoked from network); 24 Jul 2014 12:30:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2014 12:30:52 -0000 Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 95.130.10.56 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 95.130.10.56 host1.ip6-networks.net Received: from [95.130.10.56] ([95.130.10.56:36827] helo=host1.ip6-networks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/B5-58899-87CF0D35 for ; Thu, 24 Jul 2014 08:30:49 -0400 Received: from host1.ip6-networks.net (localhost [127.0.0.1]) by host1.ip6-networks.net (Postfix) with ESMTP id F3FD260ACE; Thu, 24 Jul 2014 14:30:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=hoa-project.net; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=dkim; bh= fXiHlJ357CJabnJULtq1Nb6TVaLYabKuC0mAqq30TBU=; b=UTV0K1m3PE2o6/i5 C/tp+VMl8u6IjjNWW2D6LFzvUc4piDdo+V2SC9RqsYcpXeao9/hYLvMIC8ERC4i0 BpAD38pgVHT0SWs3X4TdQ7x+02PzbX9BqT81v9P25gtXXLqPCEyT3eN9LQSp7k6A 3cWyiwyHYFhY7qB0wmMOooqWPEU= Received: from Hwhost2.local (204-64.4-85.cust.bluewin.ch [85.4.64.204]) by host1.ip6-networks.net (Postfix) with ESMTPSA id 820FC600F9; Thu, 24 Jul 2014 14:30:48 +0200 (CEST) Message-ID: <53D0FC76.3080604@hoa-project.net> Date: Thu, 24 Jul 2014 14:30:46 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: internals@lists.php.net, pollita@php.net References: <53CFB2CD.5050703@hoa-project.net> <53D0062A.20905@gmail.com> <3D49DA70-E726-439B-94E7-F8888358C04D@benramsey.com> In-Reply-To: <3D49DA70-E726-439B-94E7-F8888358C04D@benramsey.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] PHP Language Specification From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") On 23/07/2014 22:59, Ben Ramsey wrote: > This got me thinking about the whole version number debate. With a lang= uage specification, to what does the version number refer? The state of t= he language specification, or the state of a given implementation of the = specification? Right now, the number refers to the state of the PHP Group= implementation, and implementations like HippyVM and HHVM say that they = are compatible with Zend PHP 5.x. Will we version the language specificat= ion separately, and individual releases of various implementations (inclu= ding the PHP Group implementation) will state that they are compatible wi= th version X of the specification? This is exactly what I said in =93a lot of questions remain open=94 in my= =20 previous mail [1]. Taking the example of XML, CSS, HTML, ECMAScript or=20 other languages (maybe the JVM, I don't know exactly), there is version=20 numbers for the specification, that are different of the version numbers = of the implementations. Even more, the version of the implementations is = most of the time unknown (what is the version of SpiderMonkey or V8 for=20 ECMAScript x? We don't really know). In the case of PHP, this is different because the word =93PHP=94 was=20 previously (yes, it's done) representing the language **and** the=20 implementation. Consequently, we can't start with PHP1. 1. A solution would be to start with PHP6 (and 7, I don't know=85) for th= e=20 specification, and then, the version of the implementations will have no = importance (HHVM1.3, ZendEngine3.0, whatever you want). 2. Another solution is to refer to the PHP version with a =93new name=94,= =20 something like =93PHPx=94 or =93PHPv=94, so we will have "PHPx1=94, =93PH= Px2=94 etc. 3. A final solution I see is to refer to PHP with =93PHP1=94 which will b= e=20 equivalent to =93PHP6.1=94, exactly as Java7 which is in reality Java1.7,= =20 but when they will introduce Java2.x, they will encounter a problem=85 My favorite solution is the 2nd one. Moreover, what about (let's say with PHPx) PHPx1.2.3? Does it make sense = to have x.y.z for a language specification? We don't see it very often.=20 Actually, x.y is enough I would say (XML1.1, Java1.7 etc.), I don't know = any x.y.z language specification. Another problem to solve: what about the `php_version` function, the=20 `PHP_VERSION_ID` constant etc. If an implementation (a VM) respects the=20 specification, testing the version of the specification does not make=20 sense anymore, except in edge-cases, so we will really test the version=20 of language. Do we keep these functions and constants? Do we introduce=20 new ones? The specification might define the format of some functions=20 or constants to get the versions of the implementation, for example:=20 `PHP_VM_VERSION_ID` along with `PHP_VM_NAME` (something similar to what=20 PHP does with SAPI). Thoughts? [1] http://marc.info/?l=3Dphp-internals&m=3D140612071919140&w=3D2 --=20 Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/