QSC — QuickScript Code
Language Documentation · December 2025
This is a historical document. QSC was the original proof-of-concept that later evolved into the XCX programming language.
Origin
QSC (QuickScript Code) was created in late 2025 as a research experiment with one specific goal: to determine whether artificial intelligence is capable of designing a working programming language with a fully functional runtime interpreter — from scratch.
The project had no educational or commercial ambitions. It was an attempt to answer a question about the limits of AI in the field of language engineering.
Language Overview
QSC is a dynamically typed scripting language designed for readable syntax and a low entry barrier. It offers optional type declarations, classic control structures, and built-in randomness primitives.
Syntax and Language Constructs
Function Declaration
dec function (name) {
// function body
}
Variables
var(int) a = 1 // with explicit type declaration
var b = 5 // without declaration — flexible form
Output
say(value)
Code Examples
Random Greeting
import random
dec function (welcome) {
count = random.choice from (N = 0, 1, 2)
{
if count == 0 then
return "hello"
elseif count == 1 then
return "goodbye"
else
return "error"
}
}
say(welcome())
Mathematical Operations
dec function (calculate) {
var(int) a = 1
var(int) b = 5
say (a + b)
say (a - b)
say (a * b)
say (a / b)
}
Alternative version without explicit type declaration:
dec function (calculate) {
var a = 1
var b = 5
say (a + b)
say (a - b)
say (a * b)
say (a / b)
}
Conditional Math with Randomness
import random
dec function (calculate) {
var a
var b
a = random.choice from (N = 0..26)
b = random.choice from (N = 0..26)
{
if a > b then
say(a * b)
elseif a < b then
say(a - b)
else
say("a and b are equal")
}
}
Loops
For loop:
dec function (loopTest) {
for(i) from (N = 0..40) {
say(i)
}
}
While loop:
dec function (loopTest) {
var a = 0
while (a < 5) {
say(a)
a += 1
}
}
Loop with Conditional Logic and Randomness
import random
dec function (RandomMathLoop) {
var a
var b
a = random.choice from (N = 0..30)
b = random.choice from (N = 0..30)
while (a < b) {
{
if a > b then
say(a * b)
elseif a < b then
say(a - b)
else
say("EQUAL")
}
a += random.choice from (N = 1..8)
}
}
Arrays
var table = [0, 1, 2, 3, 4, 5]
say(table[0])
for n in table // 'n' holds each table value
say(n)
Array Element Classification
dec function (displayElements) {
var table = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
say(table[0])
for n in table {
if n < 3 then
say("n is in between 0 and 3")
elseif n > 3 and n <= 7 then
say("n is in between 3 and 7")
else
say("n is greater than 7")
}
}
| Parameter | Value |
|---|---|
| Initialization date | December 2025 |
| Type | Scripting language, dynamically typed |
| Successor | XCX |