Tuesday, May 31, 2005

Tolerance

Maybe one way that the VB language could move for the future is to allow a second way to express some things syntactically. Some of the things that suck about VB currently are the Dim statement, the array syntax, and the idiotic operators like CType. All of these things could have new syntaxes created to make them less silly and more, well, normal. Then, developers who are interested in doing things in a more clear and logical manner could use the new syntax, people new to the language could use the new syntax, and people who insist on syntactical backward compatibility could use the old syntax. The downsides to this are that the language is now more complex because it offers more than one way to do the exact same thing (though this is mitigated somewhat by the deprecation of the "old way"), and that people will eventually still need to learn the other way of doing something, just because they'll stumble across code samples that use it. But, I think that it's a small price to pay to change things like "CType(ThisCustomer, Person)" to something more understandable like "ThisCustomer Into Person." (This is the VB equivalent of "(Person) ThisCustomer" in C# or Java. It's less of a problem in reality since you can implicitly cast anything to anything in VB.)

2 comments:

Andy Rutledge said...

Bah! Keywords are silly! Give me some of those sweet, sweet Perl operators.

%{ $hash } = @_[0];

Ohhhhh yeah, obfuscated beauty.

Travis said...

If I were to ever create a language, :'( would be a constant that would expand to the string "Perl".