The Jock wordmark with rugby ball

A Friendly, Practical Programming Language

Jock is a subject-oriented statically-typed functional programming language that compiles to Nock and runs on any Nock VM.

curl -fsSL https://jock.org/install.sh | sh

Nock just got easy.

example.jock
// Create a simple "Hello, World!" program
let message = "Hello, World!";

// Demonstrate a conditional statement
let a: @ = 3;
if a == 3 {
  72
} else if a == 5 {
  17
} else {
  15
}

// Make a simple class with operators
compose
  class Point(x:Uint y:Uint) {
   add(p:(x:Uint y:Uint)) -> Point {
     (x + p.x
      y + p.y)
   }
   sub(p:(x:Uint y:Uint)) -> Point {
     (x - p.x
      y - p.y)
   }
  };

let point-1 = Point(104 124);
point-1 = point-1.add(38 38);
let point-2 = Point(30 40);
point-2 = point-2.add(212 302);
point-1 = point-1.sub(100 20);
( (point-1.x() point-1.y())
  (point-2.x() point-2.y())
)