CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

A bad argument

I browsed blogs for the first time in a couple weeks the other day.  Somewhere in a static typed vs dynamic typed languages argument post some clown said (paraphrasing), "we don't need no stinkin' Ruby because we can do metaprogramming in C# with IL generation."  Yeah you can, and I have as a matter of fact, but it's painful and not even remotely time effective for anything but highly reusable, simple code.  I started to say in a conversation today that the author of that statement should be beaten with a stick for that comment, but seeing as the author was obviously a masochist, that seemed like sending the wrong type of signal.

 




Comments

Justin - Web Development Blog said:

I often flip flop back and forth between which is my favorite, dynamic or static typing.

I really like the dynamic typing of PHP, Python, and JavaScript but there are lots of days that I like the static typing of C#. It really depends on the day.

Generics, however, have been invaluable in C#. I hated using ArrayLists and Hashtables.

# June 16, 2008 3:27 PM

Avish said:

Shameless (Self-)Promotion: you can mix static and dynamic typing, enjoy both metaprogramming  and generics, stay on the CLR and be natively interoperable with C# -- all using Boo (http://boo.codehaus.org).

# June 16, 2008 4:12 PM

Nate Kohari said:

Yeah! And we don't need C either, because we could just write everything in assembly! In fact, who needs language support? Let's just start writing machine codes. And don't even get me started on source control... punchcards are plenty!

</obvious_sarcasm>

# June 16, 2008 4:45 PM

Matthew.Podwysocki said:

I don't think even Anders will argue in favor of metaprogramming in IL as a viable option for doing that statically.  He already pretty much said so here:

se-radio.net/.../episode-97-interview-anders-hejlsberg

I'd rather see expressions and such through F# or some other mechanism, but the last thing I'd ever want to see is to evaluate IL as a metaprogramming style.  I don't think that person truly understands metaprogramming and the mechanisms required to make it easier.

Matt

# June 16, 2008 9:01 PM

John Rusk said:

Another difference, which is also very important, is that in C# you can only call things that are known at compile time.  The IL-generated functionality has to be hidden behind delegates, interfaces or some other structure acceptable to the compiler.  Contrast that with dynamic languages which let you add methods right onto existing classes at runtime.  

# June 18, 2008 6:11 AM

Jae said:

This is why I find Groovy very compelling.  You get all the power of a dynamically typed language, but you can switch to Java for things that don't need it and get your static typing.  

# June 24, 2008 11:10 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Jeremy D. Miller

Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy previously worked as a systems architect building mission critical supply chain software for a Fortune 100 company and learned agile development practices as a .Net consultant at ThoughtWorks, one of the pioneers of agile development. Jeremy is the author of the open source StructureMap (http://structuremap.sourceforge.net) tool for Dependency Injection with .Net and the forthcoming StoryTeller (http://storyteller.tigris.org) tool for supercharged FIT testing in .Net. Jeremy's thoughts on just about everything software related can be found on his weblog "The Shade Tree Developer" at http://codebetter.com/blogs/jeremy.miller, part of the popular CodeBetter site. Jeremy is a Microsoft MVP for C#. Check out Devlicio.us!

Our Sponsors

Proudly Partnered With


This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP