Citrine (programming language): Difference between revisions

Content deleted Content added
Syntax: brevity
Syntax: grammatical number; notation
 
(2 intermediate revisions by the same user not shown)
Line 25:
 
==Syntax==
Citrine has a very limited syntax very closely related to Smalltalk. Everything in Citrine is an ''object'',. thereThere are 5 literals:
 
* {{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 '|'; if there are no
parameters, the backslash should be used instead.
 
Citrine only supports full-line comments, which start with a '#'.
 
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.