Veeyu Primer

This documentation is an introduction to the Veeyu programming language for programmers.


<string> objects have several useful methods and properties:

>>> "hello"
>>> s := 'Veeyu language'
"Veeyu language"
>>> s.split(" ")
["Veeyu", "language"]
>>> "hello, " ++ "world!"
"hello, world!"
>>> "abc"[0]
>>> "veeyu".make-uppercase()
>>> "hello world"[2 ~ 7]
"llo w"
>>> "veeyu" as <list>
[c"v", c"e", c"e", c"y", c"u"]


There are four types of string literals:

string e.g. "like this"

This is the most commonly used string literal. It accepts C-style metacharacters like \n, \r, \t and Python-style metacharacters that represents unicode codepoints like \xff, \uffff, \Uffffffff.

See also


Raw string e.g. 'like this'
This is a raw string literal that doesn’t take any metacharacters except \'. For example, '\'this\'\ncode\\' equals to "'this'\\ncode\\\\".

Multiline string e.g. """like this"""

See also


Multiline raw string e.g. '''like this'''


Escaping Sequence Meaning
\\ Backslash (\)
\' Single quote (')
\" Double quote (")
\a ASCII Bell (BEL)
\b ASCII Backspace (BS)
\f ASCII Formfeed (FF)
\n ASCII Linefeed (LF)
\r ASCII Carriage Return (CR)
\t ASCII Horizontal Tab (TAB)
\uxxxx Unicode character with 16-bit hex value xxxx
\Uxxxxxxxx Unicode character with 32-bit hex value xxxxxxxx
\v ASCII Vertical Tab (VT)
\xhh Unicode character with hex value hh


>>> 1 + 2 + 3

There are some numeric types according to standards:

  • <number>
    • <integer>
    • <decimal>

Implementations may add some subclasses for numeric types for performance optimization or ease of implementation, so Comedy implements <int> and <long> classes that have the common superclass <integer> and match to Python’s int and long classes.

  • <number>
    • <integer>
      • <long>
      • <int>
    • <decimal>
>>> 1.class
>>> 999999999999999999.class
>>> 1 isa? <integer>
>>> 999999999999999999 isa? <integer>

Project Versions

Table Of Contents

Previous topic


Next topic

comedy — A naive Veeyu implementation

This Page