Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101322 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48092 invoked from network); 11 Dec 2017 10:24:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Dec 2017 10:24:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=andreas@dqxtech.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=andreas@dqxtech.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dqxtech.net from 209.85.215.42 cause and error) X-PHP-List-Original-Sender: andreas@dqxtech.net X-Host-Fingerprint: 209.85.215.42 mail-lf0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:46756] helo=mail-lf0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/5C-53433-BDC5E2A5 for ; Mon, 11 Dec 2017 05:24:28 -0500 Received: by mail-lf0-f42.google.com with SMTP id r143so18519925lfe.13 for ; Mon, 11 Dec 2017 02:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dqxtech-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=B4ge3nXrK5gczQYG2aralnuz9D3I/l1R83YSO10ijpc=; b=LRhYzvQnCOJ9ks3wFxdh+fTKIb7ZLB4z7drANg941UJJgj7zrgxtJb6UxyscQ2wd02 FL/eIdIWnTHRzc8Yo8mtMSlqnxIV5cw9bD3YDtHis108iYKUzFWeiZ/g4JEkNkeYXERG UTNUh7NyqYoGWO4a+cfxTDgASAHfjG6ffAmydZy6mDrnOxm5PKkmX5wvUoE807EJ2EFG R//7o7aToVVIvCbQrjZTtNnYozPHbgDRLe4LP5KIXN3BDcYTtvCRNMWSbV5+Gh2XZC9w 7ZufZD/DrieeZDRuyVvGJjuuXeyN7LDcdOXKy5nsJQ7cNGWlHpOitwrSVELF2txa/3a0 M8OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=B4ge3nXrK5gczQYG2aralnuz9D3I/l1R83YSO10ijpc=; b=ZC0MFhx1lGC3AroPXJ/krO35KzGKjJZEzhbOR38CUlxZotwRq0DUPIGB8sqCY1eg9i h5RedmBk4usQkUHWC5Am28n5JyzaFzHbgITHMftkZhEAui6UVsMqK4En2Knf7BcsgJ46 1UrhaWQ8KkdURM8M9+ubCDf8/c5cvMP759xQ05+wjilZ/yv5ZX6U91TxKLxbmvaoxAa+ 2+F6Vi2A4cDmey2oD9L72grnNjksIN8CNViGiuAmq70zhzFYYgraqF9i5TNp+mYpH5oZ SLw2K6+A0lH6R41Oy4ToXN8FvtwFNTkXNz57YDRRcyInFgzd6IW7YXqZpEjwXlnMPdde BJTQ== X-Gm-Message-State: AJaThX7lU4NmFCqGE9pn5NTzri1eHDpftn3oGmKvhuogcghfS7UGAYwZ CfJLFOkYJRMC66pJXT77/8dcRHNP X-Google-Smtp-Source: AGs4zMYPhi17s1VZTJVGTBGeiXtn2Fbn/gbLKcSndvgOR2uPI1pCtLG376x/ounaMqSynHdWuFTd7A== X-Received: by 10.46.2.74 with SMTP id 71mr18062252ljc.75.1512987864712; Mon, 11 Dec 2017 02:24:24 -0800 (PST) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com. [209.85.215.42]) by smtp.googlemail.com with ESMTPSA id g15sm2659533lfj.21.2017.12.11.02.24.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 02:24:23 -0800 (PST) Received: by mail-lf0-f42.google.com with SMTP id j124so18555152lfg.2 for ; Mon, 11 Dec 2017 02:24:23 -0800 (PST) X-Received: by 10.46.3.10 with SMTP id 10mr8425986ljd.41.1512987862992; Mon, 11 Dec 2017 02:24:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.170.16 with HTTP; Mon, 11 Dec 2017 02:24:02 -0800 (PST) In-Reply-To: References: Date: Mon, 11 Dec 2017 11:24:02 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Marco Pivetta Cc: PHP Internals List Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Reflection API: Add ::getFullName() method. From: andreas@dqxtech.net (Andreas Hennings) >> > >> > Obviously, the `\0` is horrible and can probably be improved: depends on >> > whether the API is intended for human or machine consumption. If it is >> > machine consumption, strings are the wrong approach anyway. >> >> Machine or human? >> One goal is that these names can be used as array keys or unique >> identifiers whenever we deal with a collection of reflectors of mixed >> type. >> At the same time, the name is designed to be very close to what is >> printed in exception messages, @see doc comment, etc. >> In this case, I don't see a conflict between human-readable and >> machine-readable. >> >> Maybe when you say "machine consumption" you are thinking of something >> else? > > > Machine consumption would be VOs, not strings ;-) One purpose of such names would be that they can be saved in a file or database, and read in another process. If you want a value object, then why not use the reflector object directly? Ok, because "side effects" - I agree. If we want a value object, it should be named like "ReflectorHandle", and then "ClassHandle", "FunctionHandle" etc. These would provide the name of a class, but not any information about it. But this should be in a separate method, e.g. ReflectionClass->getHandle(), and it would be a separate feature for a separate thread.