Citrine (programming language): Difference between revisions

Content deleted Content added
mNo edit summary
Restored revision 980651303 by Mazca (talk): Rv apparent paid editor
Line 1:
{{short description|Programming language}}
{{Multiple issues|{{primary sources|date=August 2020}}{{COI|date=September 2020}}}}
{{Infobox programming language
| name = Citrine
Line 20:
}}
 
'''Citrine''' is a general-purpose [[programming language]] for [[Cross-platform|Cross-platform (multi-platform)]] operating systems developed by Gabor de Mooij and Aavesh Jilani.<ref>{{Cite web|title=About: Citrine (programming language)|url=https://dbpedia.org/page/Citrine_(programming_language)|access-date=2021-02-08|website=dbpedia.org}}</ref> It focuses on readability and maintainability. Readability is achieved by syntactic and conceptual minimalism. The language is heavily inspired by [[Smalltalk]] and [[Self (programming language)|Self]] but has some very distinctive features. Like Smalltalk, Citrine treats everything as an object and focuses on sending messages to these objects. However unlike Smalltalk, Citrine lacks the concept of a class. In this regard, Citrine is more like Self and [[JavaScript]] because it uses [[Prototype-based programming|prototypes]]. The combination of Smalltalk like messages and prototypes is what makes Citrine unique.<ref>{{Cite web|last=|first=|date=|title=demo in new programming languages community|url=http://fll.presidentbeef.com/lang/citrine/|url-status=live|archive-url=|archive-date=|access-date=|website=President Beef}}</ref>
 
As of the 0.7 version Citrine has focused on supporting native human languages instead of just English to help people reduce the number of bugs because of confusion and misunderstanding due to language barriers. As such Citrine 0.7 and higher feature a translator to translate between human languages.<ref>{{Cite web|date=2016-01-27|title=Citrine: A new all-purpose programming language for UNIXoid systems|url=https://jaxenter.com/citrine-a-new-all-purpose-programming-language-for-unixoid-systems-123558.html|access-date=2021-02-08|website=JAXenter|language=en-US}}</ref>
 
==Syntax==
Line 65:
 
==Control flow==
Just like Smalltalk, control flow in Citrine is implemented by strategic use of messages. For instance, writing a conditional statement requires sending a block of code to a boolean.<ref>{{Cite web|last=|first=|date=|title=New programming language: Citrine|url=https://www.reddit.com/r/programming/comments/42gqu4/new_programming_language_citrine/|url-status=live|archive-url=|archive-date=|access-date=|website=Reddit}}</ref>
 
<syntaxhighlight lang="smalltalk">
Line 141:
 
==Scoping==
Citrine uses [[dynamic scoping]] instead of [[lexical scoping]]. Thus, there is no need for [[dependency injection]] or global variables, but it might be harder to reason about than lexical scope. This is similar in programming languages like [[Emacs Lisp]] and [[BASIC]]. In code blocks the ''var'' keyword needs to be used to declare a local variable.<ref>{{Citation|last=Zaidi|first=Rehan|title=Object-Oriented Programming in JavaScript|date=2017|url=http://dx.doi.org/10.1007/978-1-4842-2220-1_8|work=JavaScript Essentials for SAP ABAP Developers|pages=111–125|place=Berkeley, CA|publisher=Apress|isbn=978-1-4842-2219-5|access-date=2021-02-08}}</ref>
 
The following demonstration makes the Mailer object available in the module:
Line 156:
 
==References==
* [http://fll.presidentbeef.com/lang/citrine/ demo in new programming languages community]
{{Reflist}}
* [https://jaxenter.com/citrine-a-new-all-purpose-programming-language-for-unixoid-systems-123558.html Citrine Review Jaxenter]
* [https://www.reddit.com/r/programming/comments/42gqu4/new_programming_language_citrine/ Announcement on Reddit]
* [http://www.infoworld.com/article/3028559/application-development/citrine-borrows-from-ruby-javascript-c-for-object-oriented-programming.html InfoWorld interview]
 
==External links==
* {{Official website|citrine-lang.org}}
* [https://github.com/gabordemooij/citrine source code], Source code on github
 
[[Category:Smalltalk programming language family]]
<!--Interwikies-->
[[Category:Procedural programming languages]]
 
[[Category:Computer languages]]
<!--Categories-->
[[Category:Smalltalk programming language family]][[Category:Procedural programming languages]]