Skip to content

Minimal Program Structure

StavWasPlayZ edited this page Apr 14, 2026 · 8 revisions

This page will guide you in creating your first Codesh class.

TL;DR:

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

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

Important Rules

Every Codesh source file follow this structure:

  1. Opening declaration (typically בס"ד)
  2. Origin of land declaration
  3. Class(es)

In addition, every statement must end with :.

Example

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

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

Is equivalent to Java's:

public class תוכנית {
}

Explanation

  • ויהי: And there was a... (creation)
  • עצם: class
  • שמו:: and its name was...
  • תוכנית: (name of class)

To declare the class to be public, we can specify the Nigle modifier:

  • נגלה: public
  • היה: it was

Closing the modifiers list requires the היה keyword.

We then define the class' scope using ויאמר/ויתם blocks.

Clone this wiki locally