Has anyone noticed the same trend I have? We’re in this weird area of language evolution in which those of us who have been trained to think statically are beginning to envy some of the niceties provided by dynamic languages (such as implicit types) while at the same time those of us who have been trained to think dynamically are beginning to envy some of the niceties provided by static languages (such as explicit types.)
Weird.
Take, for example, C# 3.0 implicitly typed local variables,
In an implicitly typed local variable declaration, the type of the local variable being declared is inferred from the expression used to initialize the variable. When a local variable declaration specifies var as the type and no type named var is in scope, the declaration is an implicitly typed local variable declaration. For example:
var i = 5; var s = "Hello"; var d = 1.0; var numbers = new int[] {1, 2, 3}; var orders = new Dictionary();
Okay, now take a look at the following: The first from Charles Nutter(which is about providing the performance of statically compiled code while maintaining implicitly typed variables), and the second from Ola Bini, both of JRuby fame (which is about adding the ability to sprinkle static type declarations in your Ruby code to gain performance advantages from the compiler),
Duby: A Type-Inferred Ruby-Like JVM Language
We’ve long wanted to have a “Ruby-like” language, probably a subset of Ruby syntax, that we could compile to solid, fast, idiomatic JVM bytecode. Not a compiler for Ruby, with all the bells and whistles that make Ruby both difficult to support and inefficient to use for implementing itself. A real subset language that produces clean, tight JVM bytecode on par with what you’d get from compiled Java. But better, because it still looks and feels mostly like Ruby.
So I wrote one! And I used my bytecode library too!
Should Ruby have optional typing and compiler directives?
I want this in Ruby, or something equivalent to it. Not necessarily the exactly same thing, but something which in a standard way can add type declarations and also other things that can be interesting to know from a compiler perspective.
Of course in addition to C# on the .NET side, you have languages such as Boo, Nemerle, and F# that are attempting to bridge the gap between static and dynamic languages, each doing so in ways that feel natural to each projects target audience. And on the Java side you have languages such as Scala (no doubt there are *TONS* more. I just don’t spend much time in the Java world, so am not as up as I probably should be on all the various Java bytecode language/compiler projects out there) attempting to do the same. All of which I believe is absolutely wonderful for one very important reason (though there are plenty more),
Instead of making attempt to promote the “One True Language” approach, everyone seems to finding ways to embrace wrist friendly coding techniques while at the same time accepting the fact static typing provides performance benefits that you just can’t gain any other way. Of course, as Dare Obasanjo recently pointed out, the C# language specification makes the following remark, one in which I most certainly agree with and stand behind,
Remarks: Overuse of var can make source code less readable for others. It is recommended to use var only when it is necessary, that is, when the variable will be used to store an anonymous type or a collection of anonymous types.
Which brings things back to my original point: We’re in a weird area of language evolution at the moment.
Exciting!
But weird.


Ha! I have always though the same about the mysterious 'M. David Person': Smart, but Weird!
I started to follow you online cuz I thought we were of a feather. Then I realized how different you really are. And THEN I found out all the crazy kewl things you were doin and I knew how smart you were.
Hell, I was tracking your junk for more a year before I found out what 'M.' stood for.
Keep it comin!
@Ric,
>> Hell, I was tracking your junk for more a year before I found out what 'M.' stood for.
I'm not even sure *I* know what it stands for anymore ;-)
I'm re-writing an Eclipse plug-in in Scala...I haven't had this much fun since I learned python many years ago.
It's now "OK" to look at the other side and say, "hey, that's cool".
Not long ago, only us weirdos could do that.
>> It's now "OK" to look at the other side and say, "hey, that's cool".
Yeah, I've long wondered if the static/dynamic language debate would turn into a Holy War. I'm glad to see it's seemingly heading in the other direction. :)
>> Not long ago, only us weirdos could do that.
Yup! :D
It's funny, when I recently read Dan McCreary's article on the benefits of declarative languages, eXist, XQuery and XForms, with which I fully agree, my initial reaction was "don't be too dismissive of object databases, their time will come, Seaside and Smalltalk and all that" - I mean, I'm a lisper/schemer from way back, and I'm just itching to try something using a web framework that is about as iterative and non-RESTful as you can imagine. Why? I think you hit the nail on the head - developers may be starting to wise up that Holy Wars are wholly lame, and serve nobody well.
Weird.
>> Why? I think you hit the nail on the head - developers may be starting to wise up that Holy Wars are wholly lame, and serve nobody well.
Isn't it great! I was fully expecting to have to bunker down for the next 5-10 years worth of language and platform Holy Wars, but for some wonderful yet unknown reason (maybe it's something as simple as human curiosity?) that's not how it seems to be playing out.
*SWEET*! Weird. But *SWEET* none-the-less. :)
@M:D - I think we probably have the web to thank for that in a lot of ways, and the economy - used to be, you were a COBOL programmer and that's who you were and what you did, then your contract ended, and you got another COBOL job... now, you're a java code monkey for a while, you get laid off, throw together a facebook app using php on the front and jquery on the back while you're looking for a new job, switch to C# for a while...
Seriously though, for better or worse, access to high level information about a lot of different platforms and languages is readily available now. The masses know *just enough* about a lot of technologies, but the downside is that the COBOL programmer had a bookshelf stacked with manuals and knew the language backwards and forwards, whereas nobody in their right mind knows php backwards and forwards.
@piers,
>> @M:D - I think we probably have the web to thank for that in a lot of ways, and the economy -
Oh, excellent point!
>> used to be, you were a COBOL programmer and that's who you were and what you did, then your contract ended, and you got another COBOL job... now, you're a java code monkey for a while, you get laid off, throw together a facebook app using php on the front and jquery on the back
I've even heard of people using jQuery on the frontend and PHP on the back!
Yeah, I know... weird. ;-) :D
>> while you're looking for a new job, switch to C# for a while...
... and then fall head over heals for XSLT 2.0. Yeah, I know... It's a love story I've heard too many times to count. ;-)
>> Seriously though, for better or worse, access to high level information about a lot of different platforms and languages is readily available now.
Yeah, this is really an important point.
>> The masses know *just enough* about a lot of technologies, but the downside is that the COBOL programmer had a bookshelf stacked with manuals and knew the language backwards and forwards, whereas nobody in their right mind knows php backwards and forwards.
For that matter, no one in their right mind would use PHP.
And with that, let the Holy Wars begin! :D
DISCLAIMER: I don't really feel that way about PHP. Just looking for way to get some Babies Mama Drama woven back into the conversation. *MUCH* more interesting and fun that just agreeing with everyone! ;-)
>>> I've even heard of people using jQuery on the frontend and PHP on the back!
durr - obviously I needed a cup of chai before I start to type... it's funny, tho, java on the client, java on the server, xsl on the client, xsl on the server, javascript with RUNAT=Server, it can get confusing ;)
@piers,
>> obviously I needed a cup of chai before I start to type...
You should consider Yerba Mate. -> Has become my "wake the f*!k up, yet be happy about it" beverage of choice as of late. :)
>> it's funny, tho, java on the client, java on the server, xsl on the client, xsl on the server, javascript with RUNAT=Server, it can get confusing ;)
Want to go for a headtrip like none-other?
Try Volta on for size > http://research.microsoft.com/~emeijer/ :)
Ouch! (is all I have to say ;-))