Mojo (programming language): Difference between revisions

Content deleted Content added
Features: citations that actually talk about open source plans
Features: additional citations for OSS
Line 55:
The language also provides a [[borrow checker]], an influence from [[Rust (programming language)|Rust]].<ref>{{Cite web |title=Modular Docs: Ownership and borrowing |url=https://docs.modular.com/mojo/manual/values/ownership.html |access-date=2024-02-29 |publisher=Modular}}</ref> Mojo {{Mono|def}} functions use value semantics by default (functions receive a copy of all arguments and any modifications are not visible outside the function), while [[Python (programming language)|Python]] functions use reference semantics (functions receive a reference on their arguments and any modification of a mutable argument inside the function is visible outside).<ref>{{Cite web |title=Mojo programming manual |url=https://docs.modular.com/mojo/programming-manual.html |access-date=2023-06-11 |publisher=Modular |archive-url=https://web.archive.org/web/20230611225929/https://docs.modular.com/mojo/programming-manual.html |archive-date=2023-06-11 |quote=All values passed into a Python def function use reference semantics. This means the function can modify mutable objects passed into it and those changes are visible outside the function. However, the behavior is sometimes surprising for the uninitiated, because you can change the object that an argument points to and that change is not visible outside the function. All values passed into a Mojo function use value semantics by default. Compared to Python, this is an important difference: A Mojo {{mono|def}} function receives a copy of all arguments: it can modify arguments inside the function, but the changes are not visible outside the function.}}</ref>
 
The language is not open source, but it is planned to be made open source in the future.<ref>{{Cite web |title=Open Source {{!}} Mojo🔥 FAQ {{!}} Modular Docs |url=https://docs.modular.com/mojo/faq#open-source |access-date=2024-11-09 |website=docs.modular.com |language=en}}</ref><ref>{{Cite web |title=Modular: The Next Big Step in Mojo🔥 Open Source |url=https://www.modular.com/blog/the-next-big-step-in-mojo-open-source |access-date=2024-11-09 |website=www.modular.com |language=en}}</ref><ref>{{Cite web |title=Modular: Pricing |url=https://www.modular.com/pricing |access-date=2024-11-09 |website=www.modular.com |language=en}}</ref><ref>{{Cite AV media |url=https://www.youtube.com/watch?v=tYujSI_aoqk&lc=Ugy-QQjJ4PYNJyrRc354AaABAg.A7Wv5n61lVtA7j_dibRIk7 |title=Comment from @modularinc |date=2024-08-22 |last=Modular |access-date=2024-11-09 |via=YouTube}}</ref>
 
== Programming examples ==