SubClass[] does not implicitly convert to SuperClass[], why?
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Feb 20 05:24:29 PST 2015
On Fri, 20 Feb 2015 12:58:01 +0000, rumbu wrote:
> A simple cast will always permit to destroy the type system entirely:
`cast` is the thing programmer does explicitly. it's assumed that
programmer is know what he is doing, and he takes full responsibility for
that.
hidden type system breakage is completely different thing.
moving checks to runtime turns language to JS.
-------------- 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-learn/attachments/20150220/c4ad6a40/attachment.sig>
More information about the Digitalmars-d-learn
mailing list