Minor extension to cast syntax
Bruce Adams
tortoise_74 at yeah.who.co.uk
Wed Oct 31 19:56:46 PDT 2007
Gregor Richards Wrote:
> Bruce Adams wrote:
> > Gregor Richards Wrote:
> >
> >> Gregor Richards wrote:
> >>>> There is that idea in language design that if it can be done as a
> >>>> function it should be unless there is a good reason not to.
> >>> In highly dynamic languages where performance isn't a primary objective,
> >>> yes. Dynamic arrays, anyone?
> >>>
> >> I should also mention, while I'm at it, that this can NOT be done as a
> >> function.
> >>
> >> - Gregor Richards
> >
> > It could if your language was dynamic enough to support types as first class objects so that no meta syntax was required. :)
> >
>
> Yeah, but that's a matter of goals ... I love dynamic languages, my pet
> language is entirely prototype-based, so "types" are really just
> prototype objects, and are therefore passable like any other object. It
> makes things like generics really easy and intuitive, and of course
> casting is just one comparison away :)
>
> But D is a static language, and has different goals.
>
> - Gregor Richards
Agreed but wouldn't it be nice to find a language with the best of both world? By the way, which is your pet language.
Regards,
Bruce.
More information about the Digitalmars-d
mailing list