r/ProgrammingLanguages • • Jun 15 '26

Language announcement Seal programming language

Hey guys. For the past 3 years, I have been working on a programming language called Seal. I created this language in C. This is a dynamic language which has its own virtual machine. It uses indentation to define blocks and is aimed to be minimal. It is easily embeddable into any C/C++ applications. Seal is mostly imperative and procedural but you can write functional (no closures yet) and OOP-like (imitation like Lua) codes. I would appreciate your feedback.
GitHub: https://github.com/huseynaghayev/seal.git

edit:
moving to codeberg. codeberg link:
codeberg.org/seal-lang/seal

Here is a quick example:

define Human(name, age)
    h = {
        name = name,
        age = age
    }

    h.talk = define(self, msg)
        print(self.name + " says: " + msg)

    return h

h = Human("cflexer", 19)
h->talk("hello!")
34 Upvotes

38 comments sorted by

View all comments

Show parent comment

1

u/oscarryz Yz Jun 16 '26 edited Jun 16 '26

Going even further, you wouldn't even need to create self because name and age are captured and available for talk, and talk is available and captured for a struct/ object/tuple returning the three of them

define Human(name, age)
   define talk(msg)
      print(name +"("+age+") :  "+ msg)
   return { name, age, talk }
   /*
    Or 
    return {
      name = name
      age = age
      talk = talk
    }
  */

h = Human("cflexer", 19)
h.talk("Hello")

_...Closures are poor's man objects_⁷

1

u/CyberDainz Jun 16 '26

self is needed for mutable objects