LMScript vs Python, JavaScript, Perl & Lua
LMScript borrows the best ideas from four classic scripting languages — Lua's compact scripting style,
Python's r"..." / f"..." / """...""" strings, Perl's data/text ergonomics, and
JavaScript's JSON-native maps — while adding compile-checked _lmcode_ bytecode blocks and built-in AI agent orchestration.
Feature Matrix
| Capability | LMScript (.lms) |
Python | JavaScript (Node) | Perl | Lua |
|---|---|---|---|---|---|
| Block Delimiters | { ... } braces; semicolon-terminated statements |
Significant whitespace | { ... } braces |
{ ... } braces |
then ... end, do ... end |
| List Indexing | 0-based + negative (xs[0], xs[-1]) |
0-based + negative | 0-based (.at(-1)) |
0-based + negative | 1-based (no negative) |
| Parse-Time Data Blocks | Built-in _json_, _csv_, _toml_, _props_, _cmd_ |
Runtime json.loads(...) |
Runtime JSON.parse(...) |
Runtime modules | External library |
| Reverse Templates | Built-in template_extract_text(tpl, str) |
Third-party parse package |
Manual regex | Manual regex | Lua patterns |
| Built-in Dry-Run & Resume Entry Selection | --dry-run flag + recover { resumepoint name: ... } |
Manual plumbing | Manual plumbing | Manual plumbing | Manual plumbing |
| Embedded Typed Bytecode DSL | _lmcode_ → DSLB v6 verified bytecode |
None built-in | None built-in | None built-in | None built-in |
| Multi-Agent AI Sessions | Built-in agent_open / agent_turn |
External SDKs | External SDKs | External SDKs | External SDKs |
LMScript vs Python
Python's significant whitespace often breaks when AI agents splice multi-line strings or nested blocks.
LMScript keeps Python's beloved r"...", f"...", rf"...", and """...""" string literals,
but uses explicit braces and semicolons so code formatting never changes program semantics.
LMScript vs JavaScript / Node.js
In Node.js, running sequential shell commands, querying SQLite, and writing files requires juggling
async/await, child_process.spawnSync, and npm dependencies. In LMScript,
system(argv), sql_read(path, sql), http_get(...), and parallel_map(...) are synchronous-feeling
built-ins available with zero node_modules setup.
LMScript vs Perl
Perl pioneered heredocs, regexes, stateful pos() lexers, and quote-word lists (qw()).
LMScript provides Perl-like stateful pos() / set_pos() with regex_find_pos,
regex_match_pos, and regex_test_pos (plus regex_find and regex_matches
for single/all matched substrings), while LMCode adopts qw(...), qi(...), qf(...),
%(k => v), and <<~TAG without Perl's sigil context traps ($ vs @ vs %).
LMScript vs Lua
LMScript uses brace-delimited blocks and 0-based indexing. Its falsy values include
false, null, zero, and empty strings. It separates lists ([...]) from maps ({...})
so JSON serialization (json_stringify / json_parse) is always unambiguous.