Wednesday, May 02, 2007
Has anyone had a chance to really dig into the DLR??... I've briefly browsed the source code in IronPython 2.0 for the Microsoft.Scripting project, it looks promising... but I really need to sit down and write myself a simple little DSL from end-to-end to get a handle on it (when I get time, I'll be sure to post a mini-series on it ;o)

Things I have been wondering though are:
  • Is it possible to decorate dynamic classes with attributes yet? (i.e. create say an WCF message class and decorate it with [DataMember] attributes dynamically) - no attribute support in IronPython 1.x was a problem for Ivan a while ago.
  • Are continuations supported (and how) ?
  • Just how well does the language mixing work... Can I grab an instance of an IronPython class and change just a single instances methods using features particular to (Iron)Ruby
I'd love to know a few things, but just don't have the time at the moment to find out right now.

Also I wonder if pushing IronPython & IronRuby into the mainstream is going to see a surge in interest for projects like FePy ?  I still feel the value proposition for a lot of the dynamic languages on the CLR/DLR is weakened by the fact that the BCL isn't as much fun to use from a dynamic langauge as the native equivalents for the ruby or python (or certainly makes it difficult to port python or ruby knowledge of the managed equivalents) ... I'm sure I could write a YAML parser in C# that would be "good" - but it's not going to feel as nice to use as say Why's Syck parser which is built with dynamic languages in mind.
posted @ Tuesday, May 01, 2007 8:46:06 PM (New Zealand Standard Time, UTC+12:00)    Comments [2] | Trackback |
Tuesday, May 01, 2007 10:46:24 PM (New Zealand Standard Time, UTC+12:00)
We haven't really done any work on generalizing class creation in the DLR yet. This would correspond to IronPython's NewTypeMaker class which stil lives in Microsoft.Scripting.Vestigial (which is basically things which haven't been fully DLR-ized yet). We also haven't yet added support for adding attributed methods in IronPython either. So that's basically a no for multiple reasons.

We also don't have any continuation support. We could possilby do this for sequences which consisted of only script code but we'd need CLR support to do anything more complex.

If you were to grab an arbitrary mutable object from IronPython you could mutate it and add arbitrary objects to it from another language. There's questions about what are 1st class objects in other languages that I don't know deep enough. But given a fictional language that has 1st class functions you could assign that onto a Python object. How that object gets called will be interesting (Python doesn't implicitly flow this, whereas the calling language may. Therefore you'll get the calling languages behavior)... I think this might be one of the things Jim will blog about soon.
Tuesday, May 01, 2007 11:28:11 PM (New Zealand Standard Time, UTC+12:00)
Thanks for the comments Dino :) you must be having a lot of fun at the moment!

Attributes are understandably tricky - I guess I'm just interested in the interoperability story in the short and long term... at this point we cant really write everything we currently do with say C# in a dynamic language like IronPython ... will the DLR move towards reducing the gap over time, so that existing technologies like WCF are easier to work with from dynamic languages, and how soon could this be expected?

Also with regards to things like Continuations (Which to be honest don't really matter to most of us morts :) - is there a time line for getting support in the CLR to nurture these kinds of dynamic language friendly features?

Getting the calling languages behavior makes sense... but I wonder if that might cause problems when interoperability (i.e. consuming a ruby library from python, where say a factory used to create the ruby object is actually changing the functions on a per-instance basis, but from python we end up falling through to a default missing method function). Opposite might be true for say the way IronPython handles multiple inheritance vs another dynamic language like VBScript.

I'll keep any eye on Jim's blog... Are you going to start blogging again yourself Dino?
Comments are closed.
Search
FeedCount

Tags...
Who am I?
Alex Henderson
Alex Henderson
Auckland, New Zealand
Managing Director at Dev|Defined Limited

"Self Confessed Coding Junky for 15 years"
View Alex Henderson's profile on LinkedIn
 
Mobile: +64-21-402-969
Email: bittercoder 'at' gmail 'dot' com
MSN: bittercoder_nz@hotmail
Skype: alex.devdefined
Navigation