--- Comment #10 from Steven Schveighoffer <> 2011-07-11 
09:08:48 PDT ---
(In reply to comment #9)
> On a semi-related but not all that related note

Interesting :)

> I would point out to Steven
> that Kenji has made pull requests related to, one of which will
> make use opCast for user-defined conversions if a user-defined 
> type
> has an opCast, so if you don't think that opCast should be used for such
> situations (that is, if you equate that to dangerous as you've been discussing
> here), then you should comment on the pull request:

calling opCast!(T) directly is not nearly as dangerous as using cast(T).  It is
expected that opCast does not do unsafe things.  Plus it is a regular function,
so it must obey the type system (unless of course it uses casts underneath). 
In particular, it does *not* affect const/immutable unless opCast is
specifically written to do so.

So I have no problem with opCast being called from

Actually, I'm looking at in that pull request and see a significant
bug, because cast is so dangerous! (will file in a minute)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to