Russ Ross posted a question to the LL1 list, asking about any research people have done into allowing higher-level languages to use data structures from other higher-level languages in place. He points out that this is a strength of C -- you can take a pointer to the other language's memory, cast it to whatever type you want, and then go at it. But most high-level languages have their own requirements for how memory is laid out at runtime, and these requirements are almost always subtly different for each implementation.
There are several ways to address this issue. You can convert the data structures from one format to another, by making a copy. Unfortunately in order to do this you probably have to write your converter in C, because the source and target languages probably don't offer enough control over memory layout.
Another technique is to use a common virtual machine, like the JVM or Parrot. If the VM has sufficiently high-level semantics, then language implementations won't have to think up their own (incompatible) implementation technique, and they will be able to interoperate. You can think of C as being a degenerate version of this technique, where the VM is the CPU itself. That's why C is so good at handling data structures from other languages -- they both use the same CPU model.
A third technique is the one that Russ is asking about: find some way of explaining the foreign semantics of the source language in a way that the target language can understand and use directly. This would add a whole lot of sophistication to your language implementation, and quite possibly make it too much of a headache to bother with. It would impact your compiler as well as your runtime libraries, and it would require that the compiler make a distinction between the behavior of a program, and how that maps to runtime implementation. It might even require that you have multiple versions of each runtime implementation, and that all the versions are capable of interoperating in the same address space. This is clearly not trivial.
Even assuming you can handle the implementation difficulties, you still have the difficulty of finding a way to describe the semantics of a foreign language implementation. Can you imagine explaining Haskell's implicit lazy evaluation to an imperative language like Scheme? How about explaining Parrot's continuation passing implementation to a stack-based implementation like Python? Explaining garbage collection to a language that uses explicit memory management?
Posted on December 10, 2003 12:32 PM
More languages articles
Eliminating the need for the extra trouble to wear ugg boots uk 、
ugg boots sale、 uggs, in the extreme sports, look for happiness in life, with UGG Classic boots and nike sb showed off your tall body, do not worry about being laughed at, dancing new style ugg australia and nike sb dunk . The flavor of life that is colorful, there are Christian Louboutin 、cheap nike dunks、UGG cardy boots、and nike sb for sale also used fear to creep away money from your pocket Mody ? Love beauty, you might even love UGG Classic tall boots 、UGG Nightfall boots、UGG Classic short boots、new nike sb。
Uggs on sale now.UGG Classic Cardy Boot makes me different form the other
girls. The UGG Bailey Button Boot is a good choice for female.
Posted by: ugg classic cardy boots at November 17, 2009 12:51 AMThe
39.html">classic cardy uggs boots is another hot boots that worth of buying.And the classic tall ugg boots
will make your winter amusing.And now uggs on sale,if you are looking for such a boot,the ugg boots is good choice this year.
Louis Vuitton , commonly referred to as Frequently Asked Question and About Louis Vuitton website Gifico.com, or sometimes shortened to Shipping and Tracking has become one of the most Privacy Statement Agendas luxurybrands Return & Exchange policy.
rolex replica
A.Lange & Sohne replica
Alain Silberstein replica
Supra Shoes
Supra Skytop Shoes
Supra Society
Supra Thunder
Supra Suprano Hi
Supra Strapped
Supra Trinity
Supra Skylow 1.5
Supra Dixon
Diablo 1.5
Supra Cruizer
Supra Vaider Shoes
Supra Cuban
Supra Shoes
Supra Skytop Shoes
Supra Society
Supra Thunder
Supra Suprano Hi
Supra Strapped
Supra Trinity
Supra Skylow 1.5
Supra Dixon
Diablo 1.5
Supra Cruizer
Supra Vaider Shoes
Supra Cuban
We are the best online sales for the china wholesale . Here you can have a large of choices of kinds Ugg Boots,Converse Shoes,Timberland Boots,puma shoes,Nike Shox Shoes ,Nike Dunk SB Shoes,Nike Air Max,Links Of London,Tiffany Jewelry,Dior Handbags?,jimmy choo handbags ,Cartier Watches, 8GB Mp4 Players,Bluetooth Car DVDs. All our cheap online cheap goods are high quality and original packages, and best service. We offer our customers the best service, 7 days arrive at your door.Enjoy your easy and happy shopping with us.
People all over the world know the abercrombie and fitch,but not everyone really knows how fashion the abercrombie is,hollister is the Legend maker. Everybody wears the hollister clothing would be the abercrombie mens and the abercrombie womens, if you want know you can search the Ruehl No.925 or abercrombie outlet in the www.google.com .
Posted by: fitch at November 21, 2009 03:37 AM discount nike air yeezy
china wholesale online
discount ugg boots
nike free shoes
furture
ugg boots
Discount store
Laptop Battery Laptop Battery Laptop Batteries
Laptop Batteries discount laptop battery
discount laptop battery
notebook battery notebook battery
computer battery computer battery
replacement laptop battery replacement laptop battery
notebook batteries notebook batteries
rongTiffany Jewelry Online - Discount Tiffany & Co Jewelry On Sale
Hot Sell Tiffany Jewelry - Tiffany Jewelry Online
Return To Tiffany Double Heart Detachable Pendant Necklace - Tiffany Jewelry Online
Tiffany&Co 1837 Titanium I.D. Bracelet - Tiffany Jewelry Online
Tiffany & Co Bead Bracelet - Tiffany Jewelry Online
Tiffany&Co Atlas Round Pendant Necklace - Tiffany Jewelry Online
Tiffany&Co Bar Pendant Necklace - Tiffany Jewelry Online
Tiffany&Co Bead Necklace(N242) - Tiffany Jewelry Online
Tiffany&Co Bean Pendant Necklace(N157) - Tiffany Jewelry Online
Tiffany&Co Elsa Peretti Apple Pendant Necklace - Tiffany Jewelry Online
Tiffany&Co Butterfly Pendant Necklace - Tiffany Jewelry Online
Just wanted to say great job with the blog, today is my first visit here and I’ve enjoyed reading your posts so far
ugg bailey button
Wow, my ugg classic mini will not be coming off now! I’ve had them on for 12hrs strait and I do not want to take them off. Thanks for everything, well worth the wait.
cheap replica watches
Rolex Explorer watch for sale
Burberry watches
replica Concord
replica ebel
Tiffany 1837 LOCK TRIPLE BANGLE Bracelet
cheap replica watches
Rolex Explorer watch for sale
Burberry watches
replica Concord
replica ebel
Tiffany 1837 LOCK TRIPLE BANGLE Bracelet
Christian Louboutin
cheap Christian Louboutin Pumps
Christian Louboutin Boots on sale
Christian Louboutin Shoes
Christian Louboutin Boots
nike shox