Re: Scalar Type Intentions

From: Date: Thu, 01 Mar 2012 09:46:18 +0000
Subject: Re: Scalar Type Intentions
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Pierre Joye wrote:
On Thu, Mar 1, 2012 at 3:36 AM, Sebastian Bergmann<[email protected]> wrote: usually does not work. 2) What you want to achieve is already possible through docblocks. I am not saying that I like the idea of scalar type arguments, but you keep saying that docblocks solve such issue. They are totally unrelated to what is discussed here, they are documentations. They have nothing to do with runtime information (The same concept applied to the annotations, if you remember it).
But one of the reasons given for wanting this is as simple documentation? Does providing more checks at runtime actually add anything when in many cases we already need to check for valid input anyway. I can't help thinking that in many cases people proposing this are working on a basis that the variables they are passing are fully nailed down as to what is in them? When in practice we are not passing well typed variables around - until they have been checked. It would be interesting to establish just how many developers already use IDE's which provide all of this hinting and more important detailed error checking which does not rely on adding anything more to the runtime engine. I kill most of these problems before the scripts ever get run 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// Firebird - http://www.firebirdsql.org/index.php

Thread (19 messages)

« previous php.internals (#58402) next »