1
0
mirror of https://github.com/janet-lang/janet synced 2024-09-28 23:10:40 +00:00
janet/sample.gst

19 lines
663 B
Plaintext
Raw Normal View History

2017-03-07 20:29:40 +00:00
# GST is a general purpose language. It is small, not slow, and supports meta-
# programming. It also should be structured and static enough to easily scale to
# large programs. Lastly, it is interoperable with C and C++.
# Syntax - There is very little syntax. This simplifies parsing and makes macros
# easier to implement, which are useful in metaprogramming.
(+ 1 2 3)
# Unlike most lisps, it is not a pure functional language. Also unlike lisp, gst does
# not make much use of a list data structure, instead using arrays and objects for
# better performance at runtime.
2017-03-08 15:54:50 +00:00
(do
(:= a 1)
(while (< a 1025)
(print a)
(:= a (* a 2))
)
)