Boo (programming language): Difference between revisions

Content deleted Content added
Rhwawn (talk | contribs)
m Robot-assisted disambiguation (you can help!): Mono development platform
Paisen20 (talk | contribs)
 
(264 intermediate revisions by more than 100 users not shown)
Line 1:
{{Short description|none}}
{{More citations needed|date=July 2011}}
{{Infobox programming language
| name = Boo
| logo = [[File:BooLogo.png]]
|logo =
| paradigm = [[Object-oriented analysis and design|Object oriented]]
| year = [[{{Start date and age|2003]]}}
| designer = Rodrigo B. De Oliveira
| developer = Mason Wheeler
| latest_release_version = 0.79.67
| latest_release_date = [[2006-04-24]]{{Start date and age|2013|03|25|df=y}}
| typing = [[static typing|static]], [[strong typing|strong]], [[Type inference|inferred]], [[duck typing|duck]]
|typing = [[Type_system#Static and dynamic typing|Static]]
| implementations =
| dialects =
| influenced_by = [[C Sharp (programming language)|C#]], [[Python (programming language)|Python]]
| influenced = Genie, [[Vala (programming language)|Vala]]
|influenced =
| programming_language = [[C Sharp (programming language)|C#]]
|operating_system =
| platform = [[Common Language Infrastructure]] ([[.NET Framework]] & [[Mono (software)|Mono]])/
|license = [[MIT License|MIT]]/[[BSD licenses|BSD]] style license
| license = [[BSD licenses|BSD 3-Clause]]<ref>{{cite web |url=https://github.com/bamboo/boo/blob/master/license.txt |title=license.txt |access-date=August 5, 2015 |website=github.com}}</ref>
|website =
| website = {{URL|https://github.com/boo-lang}}
}}
'''Boo''' is an [[Object-oriented analysis and design|object oriented]], [[Type_system#Static and dynamic typing|statically typed]] [[programming language]] developed starting in [[2003]], which seeks to make use of the [[Common Language Infrastructure]] support for [[Unicode]], [[I18n|internationalization]] and web style applications, while using a [[Python programming language|Python]]-inspired syntax and a special focus on language and compiler extensibility. Some features of note include [[type inference]], [[generator (computer science)|generator]]s, [[multimethods]], optional [[duck typing]], [[macro]]s, true [[Closure (computer science)|closure]]s, [[currying]], and [[First-class object|first class]] functions.
 
'''Boo''' is an [[Object oriented programming|object-oriented]], [[Type system#Static typing|statically typed]], [[general-purpose programming language]] that seeks to make use of the [[Common Language Infrastructure]]'s support for [[Unicode]], [[I18n|internationalization]], and web applications, while using a [[Python (programming language)|Python]]-inspired syntax<ref>{{cite web |url=http://boo.codehaus.org/BooManifesto.pdf |title=The boo Programming Language |author=Rodrigo Barreto de Oliveira |year=2005 |access-date=February 22, 2009 |url-status=dead |archive-url=https://web.archive.org/web/20090206045607/http://boo.codehaus.org/BooManifesto.pdf |archive-date=February 6, 2009}}</ref> and a special focus on language and compiler extensibility. Some features of note include [[type inference]], [[generator (computer science)|generators]], [[multimethods]], optional [[duck typing]], [[Macro (computer science)|macros]], true [[Closure (computer science)|closures]], [[currying]], and [[first-class function]]s.
Boo is [[open source]]&ndash;[[free software licence|licensed]] under an [[MIT License|MIT]]/[[BSD licenses|BSD]] style license.
 
Boo was one of the three scripting languages for the [[Unity (game engine)|Unity game engine]] ([[Unity Technologies]] employed De Oliveira, its designer), until official support was dropped in 2014 due to the small userbase.<ref>{{cite web |url=https://blogs.unity3d.com/2014/09/03/documentation-unity-scripting-languages-and-you/ |title=Documentation, Unity scripting languages and you |author=aleksandr |date=September 3, 2014 |website=Unity Blogs}}</ref> The Boo Compiler was removed from the engine in 2017.<ref>{{cite web |url=https://blogs.unity3d.com/2017/08/11/unityscripts-long-ride-off-into-the-sunset/ |title=UnityScript's long ride off into the sunset |author=Richard Fine |date=August 11, 2017 |website=Unity Blogs}}</ref> Boo has since been abandoned by De Oliveira, with development being taken over by Mason Wheeler.<ref>{{cite web |url=https://github.com/boo-lang/boo/issues/201 |title=State of Boo · Issue #201 · boo-lang/boo |date=October 2, 2019 |website=GitHub |access-date=January 19, 2023}}</ref>
Boo can be used together with [[Microsoft .NET]] and [[Mono (software)|Mono]].
==Code samples==
 
Boo is [[free software]] released under the [[BSD licenses|BSD 3-Clause license]]. It is compatible with the [[Microsoft]] [[.NET Framework|.NET]] and [[Mono (software)|Mono]] frameworks.
===[[Hello world program]]===
print "Hello, world!"
 
== Syntax ==
===[[Fibonacci number|Fibonacci series]] [[generator (computer science)|generator]] function===
{{rewrite|2=section|date=May 2023}}
def fib():
a, b = 0L, 1L
while true:
yield b
a, b = b, a + b
 
<syntaxhighlight lang="boo">
===Basic Windows Form example demonstrating [[Class (computer science)|classes]], [[Closure (computer science)|closures]], and events===
print ("Hello World")
import System.Windows.Forms
</syntaxhighlight>
import System.Drawing
class MyForm(Form):
def constructor(message as string):
b = Button(Text: "Click Me")
b.Location = Point(100, 50)
b.Click += do():
MessageBox.Show(message)
self.Controls.Add(b)
f = MyForm("you clicked the button!")
Application.Run(f)
 
<syntaxhighlight lang="boo">
===Asynchronous design pattern with a [[Closure (computer science)|closure]]===
def fib():
import System
a, b = 0L, 1L
# The 'L's make the numbers double word length (typically 64 bits)
def run():
while true:
print("executing")
yield b
a, b = b, a + b
print "started"
result = run.BeginInvoke({ print("called back") })
System.Threading.Thread.Sleep(50ms)
run.EndInvoke(result)
print "done"
 
# Print the first 5 numbers in the series:
==See also==
for index as int, element in zip(range(5), fib()):
{{portalpar|Free software}}
print("${index+1}: ${element}")
* [[IronPython]] - an implementation of Python for the .NET platform, similar to [[Jython]].
</syntaxhighlight>
* [[Nemerle]] - a high-level statically-typed programming language for the .NET platform. It offers functional, object-oriented and imperative features as well as macros.
* [[Groovy]]- a language with similar objectuives but targetting the Java Platform
 
==External linksSee also ==
{{Portal|Free and open-source software}}
*[http://boo.codehaus.org/ Boo Homepage]
* [[Fantom (programming language)|Fantom]]
*[http://boo.codehaus.org/Language+Guide Boo Language Guide]
* [[Groovy (programming language)|Apache Groovy]]
*[http://groups-beta.google.com/group/boolang Boo Google discussion group]
* [[IronPython]]
*[http://boo.codehaus.org/Duck+Typing Duck Typing] - dynamic typing in boo
* [[IronRuby]]
*[http://boo.codehaus.org/Gotchas+for+Python+Users "Gotchas" for Python users]
* [[Nemerle]]
*[http://boo.codehaus.org/Recipes Boo Recipes], including:
* [[REBOL]]
**[http://boo.codehaus.org/XML+Serialization Serializing objects]
* [[StaDyn (programming language)|StaDyn]]
**[http://boo.codehaus.org/Regular+Expressions Regular expressions]
**[http://boo.codehaus.org/Invoke+Native+Methods+with+DllImport Invoking native methods with DllImport]
**[http://boo.codehaus.org/Opengl+3D+Samples 3D OpenGL Samples]
**[http://docs.codehaus.org/x/czU Multimethods in boo]
**[http://docs.codehaus.org/x/VTU Dynamic Inheritance - fun with IQuackFu]
 
==References==
[[Category:Class-based programming languages]]
{{Reflist}}
[[Category:Free compilers and interpreters]]
 
[[Category:Imperative programming languages]]
== External links ==
 
* [https://github.com/boo-lang/boo Official website]
* [http://jbryankelly.files.wordpress.com/2012/07/thinksciboorev2_hb.pdf How To Think Like a Computer Scientist: Learning to Program with Boo]
* [https://docs.google.com/file/d/0B8oSXKT4_sy7ZERmYnozaFlTY2M/edit?usp=sharing.pdf Boo Succinctly Revealed]
* [https://web.archive.org/web/20140521221019/http://protoman.net/index.php?p=bootorial%2Findex Bootorial]
 
{{Common Language Infrastructure}}
 
[[Category:Programming languages]]
[[Category:.NET programming languages]]
[[Category:Brazilian inventions]]
[[Category:Class-based programming languages]]
[[Category:Free and open source compilers]]
[[Category:Object-oriented programming languages]]
[[Category:ProgrammingProcedural programming languages]]
[[Category:Statically-typed programmingProgramming languages created in 2003]]
[[Category:Software using the BSD license]]
 
[[Category:Statically typed programming languages]]
[[de:Boo (Programmiersprache)]]
[[Category:2003 software]]
[[es:Boo (programación)]]
[[pl:Boo]]
[[pt:Boo]]