Codesh (קודש)

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.
קודש
Paradigm(s) Object-Oriented
Designed by Eliran Ben Moshe, Stav Solomon
Appeared in 2026
Type system Static
Computational class Turing complete
Reference implementation
Influenced by Java, Biblical Hebrew (Tanakh)
File extension(s) .אמן
Logo of Codesh

Codesh (Hebrew: קודש) is an object-oriented esoteric programming language designed by Stav Solomon and Eliran Ben Moshe whose syntax is modelled as faithfully as possible to the Hebrew Bible (Tanakh). Its source files carry the extension .אמן (amen).

Its official compiler, המוציא בשאלה (English: Motzi B'She'ela) (to be realeased), compiles to JVM bytecode, allowing it to be fully object-oriented (as G-d intended) and maintains full interoperability with Java and any other JVM language.

בס"ד
וישב בארץ ישראל:

ויהי עצם ושמו תוכנית נגלה היה ויאמר:
    ויהי מעשה ושמו בראשית לכל־נגלה היה ויקח כתובים כמסדר ושמו מנחות ויאמר:
        ויעש מסוף ל־אמר כי־ויקרא היי אמא לאמר כי־טוב:
    ויתם:
ויתם:

A Shalom Olam Codesh program

Similarity to the Hebrew Language

Reading a Codesh program is practically indistinguishable from reading a passage of scripture.

Scopes, or Pillars in Codesh terminology, open with ויאמר: ("and he said:") and close with ויתם: ("and it was complete:"); Functions are invoked with ויעש ("and he did"); and a new object is conjured into existence with ויברא ("and he created"). Every statement ends with a colon as every verse in the Torah ends with one too.

Every keyword, as well as the language syntax itself, is intentionally extremely verbose - as is the nature of the Bible itself.

bibli־case

As a convention, all identifiers in the Codesh programming language are written in bibli־case (Hebrew: קייס־מקראי).

bibli־case is defined as pure Hebrew words separated by a Maqaf Elion (־).

Examples

ויהי שלם ושמו שם־משתנה:
ויהי מעשה ושמו שחרר־את־עמי:

Abominations

All compilation errors in Codesh are considered an abomination, and will lead to a תועבה (to'eva).

Besiyata Dishmaya (בסיעתא דשמיא)

Every Codesh source must open with one of three prescribed invocations:

Invocation Transliteration
בס"ד Besiyata Dishmaya ("With the help of Heaven")
בע"ה Be'ezrat Hashem ("With God's help")
אי"א Im Yirtzeh Allah ("If Allah wills it")

Any invocation besides בס"ד may lead to unexpected compilation issues as it is believed by the Motzi B'She'ela that the programmer in question is not Jewish enough.

Biblical Numerals

Numbers in Codesh are not written as digits. Rather, they are spelled out in words, in the manner of the biblical counting system.

Numbers are composed by additive decomposition. A leading ו prefix on a word means addition; adjacent words without it imply multiplication by powers of ten.

Examples

Decimal Codesh
127 שבע ועשרים ומאה
1 אחד
7 שבע
12 תריסר
621000 אחד ועשרים אלף ושש מאה אלף

Decimal points are written with the word נקודה ("dot" / "period").

Examples

Fibonacci

בס"ד
וישב בארץ ישראל:

ויהי עצם ושמו תוכנית נגלה היה ויאמר:

    ויהי מעשה ושמו בראשית לכל־נגלה היה ויקח כתובים כמסדר ושמו מנחות ויאמר:
        ויעש פיבונאצי כי־עשר כי־טוב:
    ויתם:

    ויהי מעשה ושמו פיבונאצי לכל־נגלה היה ויקח שלם ושמו חזרות ויאמר:
        ויהי שלם ושמו א ויהי חמס:
        ויהי שלם ושמו ב ויהי אחד:
        ויהי שלם ושמו הבא:

        וימנה שלם ושמו מונה מן חמס עד חזרות ויאמר:
            ויעש מסוף ל־אמר כי־א כי־טוב:
            ויחלף הבא ב־ויוסף ל־א ב:
            ויחלף א ב־ב:
            ויחלף ב ב־הבא:
        ויתם:
    ויתם:

ויתם:

Inheritance

בס"ד
וישב בארץ ישראל:

ויהי עצם ושמו חיה נגלה היה ויאמר:
    ויהי מעשה ושמו צליל ויאמר:
        ויעש מסוף ל־אמר כי־ויקרא חיה עושה צליל לאמר כי־טוב:
    ויתם:
ויתם:

ויהי עצם ושמו כלב בן־חיה נגלה היה ויאמר:
    ויהי מעשה ושמו נביחה ויאמר:
        ויעש מסוף ל־אמר כי־ויקרא ווף ווף לאמר כי־טוב:
    ויתם:
ויתם:

See Also