HellperKK / stoicos-lang

the stoicos programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stoicos-lang

definition

The stoicos language is an interpreted, functionnal, imperative and object-oriented programming language. It is inspired from many programming languages such as :

  • OCaml
  • Python
  • Ruby
  • Racket
  • Elixir
  • Elm
  • IO

and probably other that I'm not currently remembering.

examples

Here are a few examples of what it can do

; The good old hello world
(println "Hello world!")

; Defines a variable named age
(def :age 42)

; Defines a function that does an equation then prints it
(deffun :squared [:x] {(* x x)})
(println (squared 12)) ; 144

; Functions can also be defined like that
; It is however more verbose
(def :squared (fun  [:x] {(* x x)}))
(println (squared 12)) ; 144

You can find more detailed examples in examples

About

the stoicos programming language

License:Apache License 2.0


Languages

Language:TypeScript 93.8%Language:Nearley 3.7%Language:CSS 1.2%Language:Rust 0.8%Language:HTML 0.5%