[IronPython] 2 Basic question about IronPython and dyn. langs in general

Ben Aurel ben.aurel at gmail.com
Wed May 14 17:13:10 CEST 2008


hi
I have two questions on two different subject but anyhow connected. Also 
I have to admit that I could probably find the answers myself. But I'm 
quite new to all that things and I have a lot to catch up to...

If I understand correctly the are 2 main advantages when it comes to 
dynamic languages:
+ Objects doesn't have to be typed be the developer
    (saves time, makes code shorter and better readable code)
+ Code is interpreted
    (no compilation step during development, source dont have to be 
compiled for the target machines before deployment)
 
which implies the 2 following disadvantages
- Writing a lot of tests to catch potential runtime errors (no compile time)
- Slower than native code

Questions:

1. Why belong the terms "untyped" and "interpreted" somehow together? 
Why can't the type inference that has to be done at runtime  not be done 
at compiletime. I think the runtime interpreter has to compile the 
python bytecode to native code somehow - no?
Why isn't there a possibility to *compile* python/ruby/perl/... code to 
native code at the first place?

2. I've read about, that it is possible to compile Python Code to msil 
with IronPython. Unfortunately I'm not yet at the point where this run 
on my machine (macosx). So I do have to ask you: Is such a dll/exe the 
same as I would compile it from c#? Does similar language constructs 
(eg. for loop, class object creation) the same performance?

Thanks in advance.
Ben



One of the list members - Ben Hall - pointed me at one of his blog posts 
[1].





http://blog.benhall.me.uk/2008/05/ironpython-classes-within-separate.html




More information about the Ironpython-users mailing list