Punc
Jump to navigation
Jump to search
Punc is an esoteric programming language(a LISP derivative) that uses English punctuation as-is. It was inspired by ~English, but it looks forward to simplifying its syntax.
Syntax(lists of punctuations)
punctuation | meaning | Usage |
---|---|---|
. | Ends a statement | I love Polish food. |
, | Separator; frequently used with the colon. | I know Polish, Russian, and English. See other examples on the bottom. |
: | Declare a list. | I know the following languages: Polish, Russian, and English. |
[...] or (...) | Indicates a comment | They [most of them British] have been released. |
"..." | Quote a text | "Help," he cried. |
Another example for the comma
World English, the best place to study English, has very concise tutorials.
Syntax
How to declare a list
LISP:(a b (c) d) Punc:The contents of anonymous is:a, b, c, and d.
(quote a)
LISP:(quote a) Punc:"a" In order to nest quotes, the user can switch between " and '.
(atom a)
LISP:(atom a) Punc:whether a is an atom
(eq a b)
LISP:(eq a b) Punc:whether a is equal to b
(car a)
LISP:(car a) Punc:the first item of a
(cdr a)
LISP:(cdr a) Punc:the rest of the items of a
(cons x y)
LISP:(cons x y) Punc:the result of appending x and y
(cond ( ... ) ...( ... ))
LISP:(cond ( ... ) ...( ... )) Punc:if (...) is true, then return ... and skip the rest of the ifs.