Am I the only one who finds newer programming languages, such as Java and C#, to take strong typing to a very undesireable extreme? It seems like a reaction to most programmers not being able to get type safety right in C++, but it ends up making the code look awful, obscuring its function, and requiring a lot of extra work to explicitly cast things around. Especially when working with arrays, it oftentimes requires creating entirely new loops dedicated solely to the purpose of casting. This is stupid in many different ways. ConvertAll sort of helps, but it’s clunky and doesn’t work for collections. Also, why does the cast operator have lower precedence than the dot operator? I would think the other usage would be more common.
In Perl, which I now consider my favorite language (because it doesn’t presume to impose seemingly arbitrary restrictions on the programmer), you can join an array of doubles into a string in one line of code. You can do it in two in C++, which isn’t bad, since the stream operators have overloads for numeric types. Try it in C# or Java and you’ll need at least four or five lines.
I think I prefer the flexibility of weak typing despite the added risk. It’s a pity that “hot” languages are all following the “programming with mittens” paradigm right now.