Re: Renaming type-hints to something else?

From: Date: Wed, 17 Sep 2014 10:17:35 +0000
Subject: Re: Renaming type-hints to something else?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-77282@lists.php.net to get a copy of this message
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

« previous php.internals (#77282) next »