Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77282 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70435 invoked from network); 17 Sep 2014 10:17:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Sep 2014 10:17:41 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:47181] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/02-57031-4CF59145 for ; Wed, 17 Sep 2014 06:17:40 -0400 Received: (qmail 15980 invoked by uid 89); 17 Sep 2014 10:17:37 -0000 Received: by simscan 1.3.1 ppid: 15973, pid: 15977, t: 0.0819s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 17 Sep 2014 10:17:36 -0000 Message-ID: <54195FBF.4020502@lsces.co.uk> Date: Wed, 17 Sep 2014 11:17:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: internals@lists.php.net References: <908B15B3-0F21-4A92-B129-152EA7201F89@golemon.com> In-Reply-To: <908B15B3-0F21-4A92-B129-152EA7201F89@golemon.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Renaming type-hints to something else? From: lester@lsces.co.uk (Lester Caine) On 17/09/14 09:46, Sara Golemon wrote: > As for Hint versus Declaration/Decl or Annotation or whatever... My second choice (since staying with hint is my first) is probably decl(aration). Despite my HHVM loyalties, I'm not fond of using "annotation" here anyway. There's a reasonable argument in this thread for "check", but that feels clumsy from the user side. I still can't help feeling we have conflicting 'requirements' here and that depends on how you are targeting running your software. Obviously compiling a project will give the fastest most compact code, while running the raw scripts 'unadulterated' will be the slowest route. Using intermediate caching has worked nicely for many years and my eaccelerator stuff still works fine. To that end, I still view Reflections and annotation bloat as an extra load that was not required when using docblock annotation which most good IDE's happily run with. This is all stripped in the caching and just as we 'min' css and javascript we can 'min' the script files without actually compiling them to reduce loading time. Not as relevant as it once was, bu still much more in the spirit of flexibility that PHP used to have ... I can see an advantage in a 'hint' where the code flow expects a scalar value, but it SHOULD only be a hint not a 'crash if not' declaration and in many cases again, a good IDE checking the code during development is much more useful than adding a lot more secondary checking in the core code flow? If the wrong type gets passed, the problem in the code is elsewhere anyway? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk