Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105112 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43921 invoked from network); 5 Apr 2019 17:06:15 -0000 Received: from unknown (HELO mail-oi1-f170.google.com) (209.85.167.170) by pb1.pair.com with SMTP; 5 Apr 2019 17:06:15 -0000 Received: by mail-oi1-f170.google.com with SMTP id w139so4910790oie.9 for ; Fri, 05 Apr 2019 07:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8+CdOsU0ZUIfo1Ch2zp2c/+y5Z97xPu0IL+kV8KOcII=; b=DtI810Xaf2PlYYn1vTj4S7N+YBR2iD4cJmyS5FJj4d3qTd6O+mKnyI1N5mnBpuuhuL 1aA2BAoigAwKBbAxTVnq5pwB7Vh4avy0IYfHd4EvYB2hbGdvIXR7tjZx7r2j/Il2nGUe eoVMEfU7o/DXp9ALkGvfAQ0QZtctCf5ogg9T4Dc9QRKuZAu9wXTo4wFTiz5ixMK/w1US rPgBBzrdlmHeaM0wvEhmYOsbaq7J5Bu+YQdKIjHf5MRlMUUHjzPnrXPY8PZHzGGAUnd/ +KKnhKC68CSc0KYH2GrOuVwVxmMUHHvy5BtasDP9eVvKPn41FMyU4cvAXWgGvs2IfJHH t4qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8+CdOsU0ZUIfo1Ch2zp2c/+y5Z97xPu0IL+kV8KOcII=; b=pzBywiTVSQtXE5Qy7Vjnj+8Gzq8Mpvt9vUEHYeG1EnRo40rOCd9oIBzF9CAPQpxwjx KCDr176AmuuqKf+Yd86j6qQkpnRLOeSAl/WmKE+EDJ1r6ZjbKwf7bTt+qaNMFfQuz/yQ c9t1fwu+Vs25PzDCY3of8JGEDii/O58C4EV66UjExRwY+0saNdckrF8l+9vVpTUu4w3u XMsV3nXrCkEt9NQJvT9pigsNv/+I/nyeM4wNKw1Sg4cjbbV4zhQL+LALeQY+6nYbzqSu unPV5RpjPF+2vBMWMTiQqVdZNyBjwGSevjA9wH5//PEkJEEKbbE8ABzJMxboYf7cUcx5 DA6g== X-Gm-Message-State: APjAAAXDzb/1czQF79MviJxwTu4GQVExuMiArtf9WUsgShrmTN1ymuNC vjp2Xv9+Tgy1cbAg3NFWXG7jPjjZlXXRFycg64t5lA== X-Google-Smtp-Source: APXvYqycy/5t+QsCCeVc145enCDT8AOYeHlbbq7ZRau0aCnygfd+G44BJQde/J8PuAuSfhQAGF5E3Vqg10NiCZcG5wI= X-Received: by 2002:aca:4f56:: with SMTP id d83mr6792972oib.24.1554472929535; Fri, 05 Apr 2019 07:02:09 -0700 (PDT) MIME-Version: 1.0 References: <3144F5D1-1F18-4C42-9B3E-AF1B1E598E47@koalephant.com> <917cb7bc-4abc-4bae-1a5a-b2ba1777fa55@gmail.com> In-Reply-To: Date: Fri, 5 Apr 2019 15:01:57 +0100 Message-ID: To: Lester Caine Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Question about adding !function_identifier From: robehickman@gmail.com (Robert Hickman) > > If the static analyser was programmable, it would be possible to > > provide it such information, within the scope of a single code base. > > In the case of data returned from a database, the metadata for the > database is another source of information relating to that data, and it > would be useful if PHP had a means to access that data, but in reality > this is still currently an area for developing 'a single code base' > within the IDE level rather than PHP itself? > I already do this to a small extent with my code using Psalm, and intend to explore it more deeply in the future. I was just making the point that having this ability is useful, in case the PHP project were to develop a 'core' static analysis system. Specifying this information directly in the code, vs specifying it at the level of an API is, in my opinion, just an application of separation of concerns. Having an API for it allows type checking to be applied to existing dynamic code bases which make use of dynamic functionality in a statically knowable way, which cannot be expressed within the type system. And yes, I do believe that having a result set be a simple associative array is perfectly fine. I defer why to the lecture 'simple made easy', available on youtube and else ware. .