Morning,

> Why would that be expected behaviour? I mean I can't do
>
>    $date = (DateTime) $timestring;

No, but you can't do:

     $string = (string) $datetime;

But can do:

    $string = (string) $ustring;

Where $ustring is instanceof UString.

Even if you never write $string = (string) $ustring, the engine will
perform the same
action all the time, whenever you pass a UString to anything expecting
string.

It feels like a complete implementation should support both casts.

Cheers
Joe

On Wed, Jul 1, 2015 at 7:38 AM, Andreas Heigl <andr...@heigl.org> wrote:

> Hi Joe.
>
> Am 01.07.15 um 07:36 schrieb Joe Watkins:
> > [..]
> >
> > Another possible issue is engine integration:
> >
> >     $string = (UString) $someString;
> >     $string = (UString) "someString";
> >
> > These aren't very different to 'new UString', but for an integrated
> > solution, kind of expected to work.
>
> Why would that be expected behaviour? I mean I can't do
>
>     $date = (DateTime) $timestring;
>
> after all, can I? But I can use
>
>     $date = new DateTime($timestring);
>
> Just my 2 Cent.
>
> Cheers
>
> Andreas
> --
>                                                               ,,,
>                                                              (o o)
> +---------------------------------------------------------ooO-(_)-Ooo-+
> | Andreas Heigl                                                       |
> | mailto:andr...@heigl.org                  N 50°22'59.5" E 08°23'58" |
> | http://andreas.heigl.org                       http://hei.gl/wiFKy7 |
> +---------------------------------------------------------------------+
> | http://hei.gl/root-ca                                               |
> +---------------------------------------------------------------------+
>
>

Reply via email to