On Thu, 28 Jan 2010 02:32:20 +0100, strtr <st...@spam.com> wrote:

Personally, I use (D1)std2.conv a lot to get values from strings and thus would love the following default behaviour for all types:

int i = "0"; // i = 0
i = cast( int ) "0"; // i = 48 ( If I read the utf8 table correctly )

What keeps this from being the case?

Implicit casting between unrelated types is considered bad. Most
strings are not convertible to an int or whatever typeof(lhs).

--
Simen

Reply via email to