The programming language you wish you had learned first.
Victoria is a learning-first programming language designed specifically for:
- Beginners learning to code for the first time
- Students studying Data Structures and Algorithms (DSA)
- Educators teaching programming concepts
- Competitive programmers who want clean, readable code
It combines the best features of Python, JavaScript, Go, and C, without the confusion.
// Clean and readable
let name = "World"
print("Hello, ${name}!")
// Grows with you — add types when ready
define factorial(n:int) -> int {
if (n <= 1) { return 1 }
return n * factorial(n - 1)
}
// DSA-ready constants
#make MOD 1000000007
#make INF 999999999
| Language | Problem for Beginners |
|---|---|
| Python | Indentation errors are confusing; no optional typing until 3.10; slow for competitive programming |
| JavaScript | undefined, null, NaN chaos; == vs ===; async confusion |
| C/C++ | Pointer nightmares; segfaults; manual memory management; cryptic errors |
| Java | public static void main(String[] args) just to print "Hello World" |
| Go | Great but strict; error handling boilerplate; no generics (until recently) |
| Feature | Victoria | Python | JavaScript | C++ | Java |
|---|---|---|---|---|---|
| Readable syntax | ✅ | ✅ | ❌ | ||
| Optional static typing | ✅ | ❌ | N/A (required) | N/A (required) | |
| Helpful error messages | ✅ | ❌ | ❌ | ||
| Zero configuration | ✅ | ✅ | ❌ | ❌ | |
| DSA-ready constants | ✅ (#make) |
❌ | ❌ | ✅ (#define) |
❌ |
| Enum support | ✅ | ❌ | ✅ | ✅ | |
| Character operations | ✅ | ✅ | ✅ | ✅ | |
| Package Manager | ✅ (vic) |
✅ (pip) |
✅ (npm) |
❌ | ✅ (maven) |
Victoria features a modern module system and its own package manager, vic.
Include built-in or local modules easily:
include "os"
include "math"
include "mylib" // Loads mylib.vc
print(math.sqrt(16))
print(os.platform)
Install libraries directly from GitHub:
# Install a library
vic install victoria-lang/http-client
# Use it in your code
include "http-client"| Victoria | Python |
|---|---|
|
def count_freq(s):
freq = {}
for c in s:
if c not in freq:
freq[c] = 1
else:
freq[c] += 1
return freq
print(count_freq("hello"))
# {'h': 1, 'e': 1, 'l': 2, 'o': 1} |
Victoria Advantage: Same clarity as Python, but with C-style braces that make scope crystal clear for beginners.
| Victoria | C++ |
|---|---|
|
#include <vector>
#include <iostream>
int binarySearch(std::vector<int>& arr, int target) {
int left = 0;
int right = arr.size() - 1;
while (left <= right) {
int mid = left + (right - left) / 2;
if (arr[mid] == target) {
return mid;
} else if (arr[mid] < target) {
left = mid + 1;
} else {
right = mid - 1;
}
}
return -1;
}
int main() {
std::vector<int> nums = {1, 3, 5, 7, 9, 11};
std::cout << binarySearch(nums, 7) << std::endl;
return 0;
} |
Victoria Advantage: No includes, no main() boilerplate, no std:: prefixes — just the algorithm.
| Victoria | Java |
|---|---|
|
enum NodeState {
UNVISITED, VISITING, VISITED
}
public class Graph {
public boolean hasCycle(
Map<Integer, List<Integer>> graph,
int node,
NodeState[] states
) {
if (states[node] == NodeState.VISITING) {
return true;
}
if (states[node] == NodeState.VISITED) {
return false;
}
states[node] = NodeState.VISITING;
for (int neighbor : graph.get(node)) {
if (hasCycle(graph, neighbor, states)) {
return true;
}
}
states[node] = NodeState.VISITED;
return false;
}
} |
Victoria Advantage: Same enum power as Java, without the class ceremony.
| Victoria | C++ |
|---|---|
|
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 999999999
#define MAXN 100005
long long power(long long base, long long exp) {
long long result = 1;
base %= MOD;
while (exp > 0) {
if (exp & 1) {
result = (result * base) % MOD;
}
exp >>= 1;
base = (base * base) % MOD;
}
return result;
}
int main() {
cout << power(2, 10) << endl;
return 0;
} |
Victoria Advantage: #make works like #define but is cleaner. No #include, no main().
Victoria's error messages are designed to teach, not frustrate.
error: type mismatch: cannot assign string to variable of type int
--> example.vc:3:14
|
2 | let count:int = 0
3 | count = "hello"
| ^^^^^^^ expected int, got string
|
= note: Victoria uses optional static typing for safer code
= help: either change the value to an integer, or change the type to :string
error: identifier not found: userName
--> example.vc:5:7
|
5 | print(userName)
| ^^^^^^^^ not defined in this scope
|
= help: did you mean 'username'? (check capitalization)
= note: variables must be declared with 'let' before use
error: cannot reassign constant variable: PI
--> example.vc:4:1
|
2 | const PI = 3.14159
3 |
4 | PI = 3.0
| ^^ cannot reassign constant
|
= note: constants declared with 'const' cannot be changed
= help: use 'let' instead if you need to reassign this variable
error: array index out of bounds: 10
--> example.vc:3:1
|
2 | let arr = [1, 2, 3]
3 | print(arr[10])
| ^^^^^^^ index 10 is out of bounds for array of length 3
|
= note: array indices start at 0 and go up to length-1
= help: valid indices for this array are 0, 1, 2
# Clone and build (requires Go 1.21+)
git clone https://github.com/theawakener0/VictoriaLang.git
cd VictoriaLang/victoria
go build -o victoria cmd/victoria/main.go
# Or with one command
go install github.com/theawakener0/VictoriaLang/cmd/victoria@latest# Interactive REPL
./victoria
# Run a script
echo 'print("Hello, Victoria!")' > hello.vc
./victoria hello.vcCreate two_sum.vc:
// Classic Two Sum problem
define twoSum(nums, target:int) {
let seen = {}
for i in 0..len(nums) {
let complement = target - nums[i]
if (seen[complement] != null) {
return [seen[complement], i]
}
seen[nums[i]] = i
}
return []
}
let nums = [2, 7, 11, 15]
print(twoSum(nums, 9)) // [0, 1]
Run it:
./victoria two_sum.vc// Variables (dynamic or typed)
let name = "Victoria"
let age:int = 1
const PI = 3.14159
// Functions
define greet(name:string) -> string {
return "Hello, ${name}!"
}
// Lambda expressions
let double = x => x * 2
let add = (a, b) => a + b
// Control flow
if (age >= 18) {
print("Adult")
} else {
print("Minor")
}
// Loops
for i in 0..10 {
print(i)
}
for item in items {
print(item)
}
// Compile-time constants
#make MOD 1000000007
#make MAXN 100005
// Enums for state management
enum State { UNVISITED, VISITING, VISITED }
// Character operations
let ascii = ord('A') // 65
let char = chr(65) // "A"
let isNum = isDigit('5') // true
// Array slicing
let arr = [1, 2, 3, 4, 5]
let first = arr[:2] // [1, 2]
let last = arr[3:] // [4, 5]
let mid = arr[1:4] // [2, 3, 4]
// Hash maps with index assignment
let freq = {}
freq["a"] = 1
freq["a"] = freq["a"] + 1
let nums = [1, 2, 3, 4, 5]
let doubled = map(nums, x => x * 2) // [2, 4, 6, 8, 10]
let evens = filter(nums, x => x % 2 == 0) // [2, 4]
let sum = reduce(nums, (a, b) => a + b, 0) // 15
// Math
print(math.floor(3.7)) // 3
print(math.ceil(3.2)) // 4
print(math.sqrt(16)) // 4
print(math.random(1, 100)) // Random 1-100
// JSON
let data = json.parse('{"name": "Victoria"}')
print(json.stringify(data))
// Time
print(time.now())
print(time.format(time.now(), "YYYY-MM-DD"))
| Document | Description |
|---|---|
| Language Reference | Complete syntax, types, and features |
| Philosophy | Why Victoria is designed this way |
| Language Levels | Progressive learning path |
| Roadmap | Future plans and features |
The examples/ directory contains many ready-to-run programs:
| File | Description |
|---|---|
hello.vc |
Hello World |
fib.vc |
Fibonacci sequence |
dsa_demo.vc |
DSA algorithms showcase |
types_demo.vc |
Type system demo |
structs.vc |
Object-oriented programming |
server.vc |
Simple HTTP server |
try_catch.vc |
Error handling |
./victoria examples/dsa_demo.vcOutput:
=== Algorithm: Character Frequency ===
Frequency of 'mississippi': {m: 1, i: 4, s: 4, p: 2}
=== Algorithm: Binary Search ===
binarySearch([1,3,5,7,9,11], 7): 3
=== Algorithm: Fibonacci (Memoization) ===
fib(30) = 832040
=== Algorithm: Sieve of Eratosthenes ===
Primes up to 50: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
Victoria is open source and welcomes contributions!
- Found a bug? Open an issue
- Have a feature idea? Start a discussion
- Want to contribute? Check the Roadmap
- More built-in data structures (Stack, Queue, Heap)
- Standard library expansion
- Neovim & VS Code extension with syntax highlighting
- Package manager
- Compiler (currently interpreted only)
MIT License — Use Victoria however you'd like.
