Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Is Boo Python?

Discussion in 'Editor & General Support' started by taumel, Feb 19, 2006.

  1. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Hi,

    i've just read that now i can script in Phyton on your mainpage. Does that mean that Boo is Pyhton? If so which version of Pyhton? Or will you add Python support? Are there any speed comparisons/numbers between the scripting languages?


    Greetings,

    taumel
     
  2. socksy

    socksy

    Joined:
    May 21, 2005
    Posts:
    244
    I don't think that should be there...

    In some of the Unity betas, python was an option to script with. But apparently, due to some problems - perhaps about not being statically typed - it was removed.

    Boo is very much like Python, but statically typed, and some differences in other ways. Read more about it here.

    It may well suit you if you're a python developer.
     
  3. freyr

    freyr

    Joined:
    Apr 7, 2005
    Posts:
    1,148
    Boo is a language very similar to Python. The main difference is that it is statically typed instead of dynamically typed (and therefore much faster). The types are inferred from the context, though, so the syntax is very close to that of Python and you usually do not have to specify the types implicitly.

    You can read more about Boo at http://boo.codehaus.org/ Take a look at the page about differences between the languages at http://boo.codehaus.org/Gotchas+for+Python+Users

    Btw. Boo is created Rodrigo B. de Oliveira, who also used the same code base to implement Unty's version of Javascript for Otee.
     
  4. freyr

    freyr

    Joined:
    Apr 7, 2005
    Posts:
    1,148
    Python was used for the scripting inside Unity during early development long time before any betas were distributed, but got ditched in favour of Mono due to it's multiple language support and performance issues. .Net code inside Unity is about 5-10 times faster than embedded Python.
     
  5. socksy

    socksy

    Joined:
    May 21, 2005
    Posts:
    244
    Aha, my bad. I just assumed it was in the Betas, because people were talking about it around that time in here, I never actually tried it :)
     
  6. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Hello,

    hmmm, so i can't write pure pyhton 2.4 code for instance and throw it into unity without altering it...

    I think i've read somewhere that net2 will support python. Well, ruby still rules but i like python.

    Apparently every language which forces me to write semicolons in each line sucks somehow...

    As for my question regarding the speed differences between boo, javascript and c#. Do you have an numbers?


    Greetings,

    taumel
     
  7. freyr

    freyr

    Joined:
    Apr 7, 2005
    Posts:
    1,148
    Not quite. Although Boo is very close, just take a look at the "Gotchas for Python programmers" link I posted above. It's pretty easy to adapt simple Python code to Boo. ... and Boo doesn't force you to enter semicolons either :p

    As far as I know, there should not be any significant difference in performance between the three languages supported by Unty.
     
  8. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Hi freyr,

    >>>Not quite. Although Boo is very close, just take a look at the "Gotchas for Python programmers" link I posted above.<<<

    Okay i will have a look.

    >>>It's pretty easy to adapt simple Python code to Boo. ... and Boo doesn't force you to enter semicolons either :p<<<

    No, but Javascript and C#. Although C# is a nice language in other fields...

    >>>As far as I know, there should not be any significant difference in performance between the three languages supported by Unty.<<<

    Okay


    Thanks,

    taumel
     
  9. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    All three are compiler to the same .NET bytecode and executed by the same virtual machine. So any speed difference comes just if you use the languages differently (e.g. in JavaScript you can make it so that the compiler can't guess the type and hence must use dynamic typing - which is slower).
     
  10. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    Hi NeARAZ,

    >>>All three are compiler to the same .NET bytecode and executed by the same virtual machine.

    Yes that's obvious and beside of speed differences which result on language specific characteristics is there a difference which results on the generation of the bytecode from the different languages?

    Out of your last answer i suspect it's not...


    Greetings,

    taumel