3 ms·
I wish every programming language homepage had a small code example. I know this is a LISP-like language and I can expect it to look like any other LISP. But I
by eddieh 10y ago
I wish every programming language homepage had a small code example. I know this is a LISP-like language and I can expect it to look like any other LISP. But I still appreciate getting a glimpse of the language without having to hunt through documentation for a tutorial.
A small code example can tell you way more than a language description. An example is the PL equivalent of the picture is worth a thousand words adage.
Additionally, it is not a given that a LISP will use S-expressions. It could use M-expressions, or even G-expressions (form a LISP like language I helped develop that nobody has ever heard of).
Go, Rust, Ruby, Python all have examples on their homepage. Oddly, Swift does not.
- deleted 10y ago[deleted]
- clamberson 10y agoDid you work on Ginger? I'd love to see what that looked like :)
- eddieh 10y agoYup, it was Ginger. The syntax was like a mix of Python and Scheme. define fib (n) if (= n 0) 0 elsif: (= n 1) 1 else: (+ (fib (- n 1)) (fib (- n 2))) println (fib 20)
- hilti 10y agoIf you love small code examples, then check out newLISP running inside a browser. That REPL is pretty fun. http://www.newlisp.org/newlisp-js/ http://www.newlisp.org/newlisp-js/