While I sort of agree with you, I strongly object against your biasm.
Both Microsoft and Perl are doing DWIM. Either you think DWIM is good,
or it's bad and you prefer BSDM, but I find it silly to say that when
Microsoft is doing it, it's evil, but when Perl is doing it, it's good.
Same for IE and Netscape. Netscape has been second guessing document
authors longer than that Bill Gates realized the internet was here
to stay.
I don't think VB produces unpredictable results. That the return value of
a function depends on the data passed to it isn't strange at all. Lots of
function in lots of languages do so! As for the setting of locale, well,
that's a parameter as well. Does Perl also have unpredictable results because
the return value of uc and lc depend on locale?
sort depends on locale as well, and some regexes too. Does
that make Perl unpredictable? What about binary | and
^, where it matters whether the operands are strings or numbers.
Or post/pre increment, where it can matter whether something was used in
numeric context or not. I'd say that's far more "unpredictable" than the
date function in VB.
The solution is of course here.
I believe that DWIM is a powerful feature. But just like powertools, they
aren't for everyone. They are powerful in the hands of a master, and
dangerous for those who cannot deal with them.
-- Abigail