Inferred Type for Explicit Cast

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 20 11:00:47 PST 2014


On Sat, 20 Dec 2014 18:19:21 +0000
Jonathan Marler via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> > we can't make `cast` less powerful now, but what we surely 
> > shouldn't do
> > is making it more poweful.
> 
> You're right we can't make it less powerful because it's 
> necessary.  If you have an idea on how D could get rid of it we 
> would all love to hear it:)

something like modula's "system" module: if you need `cast`, or
pointers, or other "low-level" things, you should import "system"
module. and you HAVE to write `system.cast(...)`. make it cumbersome!
let `to!XXX` do the work, with all it's checks. making unsafe features
easier to use is a way to spread their usage, and i see it as a
"generally bad thing".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141220/85d792bd/attachment.sig>


More information about the Digitalmars-d mailing list