Changelog
What's changed
A record of all notable changes to code-lang. The project follows a rolling development model — breaking changes will be noted explicitly once v1.0 stabilizes.
Language
- +Tree-walking interpreter rewritten from Go to Rust
- +First-class functions, closures, and recursion
- +Structs with default field values and dot-notation access
- +Module and import system for stdlib and .cl files
- +Control flow: if / elseif / else, while, for, break, continue
- +Operators: arithmetic (** //), comparison, logical (&& ||), compound assignment, prefix/postfix ++/--
- +Types: Integer, Float, String, Char, Boolean, Array, Hash, Null, Function, Struct, Module
Standard library
- +fmt — print, eprint, input, typeof, to_int, to_float, to_str, clear
- +math — PI, E, sqrt, abs, pow, floor, ceil, round, log, sin, cos, tan, min, max, clamp
- +strings — to_upper, to_lower, split, join, contains, replace, trim, reverse, to_chars, from_chars, parse_int, parse_float
- +arrays — 20 functions including push, pop, slice, sort, zip, flatten, unique
- +hash — keys, values, entries, has_key, merge, delete, len
- +fs — read_file, write_file, append_file, read_lines, exists, list_dir, mkdir, copy, rename, remove
- +path — join, basename, dirname, stem, extension, absolute, is_absolute
- +os — args, platform, arch, get_env, set_env, get_wd, hostname, exit
- +time — now, unix, sleep, since, format, year/month/day/hour/minute/second
- +json — parse, stringify
- +rand — int, float, choice, shuffle
- +http — get, post, post_json (blocking, returns status/body/ok)
Errors
- +All errors carry line and column from the call site
- +Error output shows source line with caret pointer
- +Parse errors surface to the user before evaluation begins
- +Non-zero exit code on any error in script mode
REPL
- +Persistent history across sessions (~/.code_lang_history)
- +exit, exit(), and quit all exit cleanly
- +Errors print to stderr without crashing the session