On September 8, 2004 04:34 pm, Dan Sugalski wrote:At 11:02 PM +0100 9/8/04, Richard Jolly wrote: >Hi, > ><newbie> > >Can someone provide clarification on what mixing languages will look >like in practice, or point me to where its explained?
It's not explained anywhere. Besides, it's syntax, and we don't do syntax. :)
It'll likely be something like:
#! /usr/bin/perl $foo = <<EOP for foo in range(10): print foo EOP $bar = eval $foo, "Python";
give or take. I doubt you'll see people mixing languages in source files that often -- more likely you'll use library modules, and those modules will be in perl 5 /perl 6/ python/ ruby/ tcl/ cola/ assembly/ forth/ postscript/ befunge/ intercal/ applescript/ whatever.
Now why can't you use other languages symbols in your chosen language?
I'm not sure exactly what you mean here. You'll certainly be able to use values returned from code in another language. That should be no problem unless whoever's writing the language compiler decides to be anti-social.
Whether you'll be able to switch from one language to another within a single file, or have means to compile code in a different language at runtime, is entirely up to the language designer and implementor, and it's definitely possible that you won't be able to do that. Not much we can do at the parrot level -- we can't force someone to put string eval into their language... ;)
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk