Content deleted Content added
→top: missing comma |
→Syntax: grammatical number; notation |
||
(6 intermediate revisions by the same user not shown) | |||
Line 22:
'''Citrine''' is a general-purpose [[programming language]] for [[Cross-platform|various operating systems]]. 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.
Since version 0.7, Citrine has focused on using forms based on various natural languages instead of just English, improving usability for users of other languages, thereby reducing programming effort and incidence of bugs. As such, Citrine 0.7 and
==Syntax==
Citrine has a very limited syntax
* {{code|Nil}}
Line 33:
* <code>{ ...params.. ...block of code... }</code>
The code block literal uses a ''pipe'' symbol ⟨|⟩ to separate the parameters from the logic
parameters, the backslash should be used instead.
Citrine only supports full-line comments, which start with
A Citrine program is basically a sequence of messages sent to objects. For instance, to determine whether 5 is an even number, the message 'even?' is sent to the number 5.
|