On Mon, Jun 11, 2018 at 11:32 PM, Rowan Collins <rowan.coll...@gmail.com>
> Hi Rasmus,
> While I agree with your general point regarding consistency, I just want to
> take issue with sentence:
> On 11 June 2018 at 15:12, Rasmus Schultz <ras...@mindplay.dk> wrote:
> > Hack made some very regrettable decisions in this area, and ultimately
> > those features were useful at design-time only, for IDE-support - but
> > we have php-doc for that purpose, and in my opinion, adding those
> > features before (or unless) we're willing/able to also make them work
> > consistently with the language, does more harm than good.
> As far as I know, every other language which has added type annotations to
> a dynamically typed language has done so either using an offline tool
> (treating them like compiler warnings), or as a debug-only run-time flag
> (treating them like assertions). The creator of "gradual typing", which is
> explicitly the basis of Python's type annotations, and at least implicitly
> used by many other languages, specifically stated that it was intended to
> be checked at compile-time, not run-time :
Making "type hint" a "true type hint" is useful with DbC as well as static
declare(strict_types=-1); // -1 indicates assert() type check. i.e. asset
is disabled, no type checks.
How it should behave with object would be debatable.