- empty.c type_name -> 'empty'
- lf_type: with structural typing the type of an object IS its
structure, so an object with no members has the empty type -- both
the canonical 'empty' and a fresh '{}'
- ffi test expectation updated; 84/84 tests
Matches the lowercase convention of every other type (int, bool,
generator, native, list). Updates table.c, empty.c and the ffi test
expectation. 84/84 tests.
- delete the nil type; catscript has no nil and no null
- add the empty object (Object with no members), exposed as the global
'empty'; it is a shared immutable singleton
- 'nil' is no longer a keyword: it is an undefined global, which raises
- undefined global -> error (consistent with a missing attribute)
- only 'false' is falsy (numbers/objects are truthy); booleans kept
- OP_NIL -> OP_EMPTY; compiler, VM, stdlib, toml, ffi, generator, file,
list, selector, value all migrated
- rename the table type to Object
- std/ front-end and examples/tests migrated to 'empty'
- 84/84 tests
- CAT_TYPES_FUNCTION_Closure gains an attrs table; get/set_attribute
give closures real members, so a function can hold _doc_ and any other
attribute like a table
- cat_types_function_attrs() accessor; attributes() enumerates a
closure's members; help() reads a function's _doc_
- compiler: generalise dotted assignment to chains (name.a.b = v), so a
method can be documented (Calc.add._doc_ = ...)
- tests/functions_as_objects.cat + 7 assertions (84 total, all green)
- README: 'funcoes tambem sao objetos' + reflection sections
- new list type (iterable, indexable) backing attributes()
- attributes(obj): member names of a table/object, follows __index
inheritance, includes native and slot members (like Python dir())
- help(obj): prints the value's _doc_ documentation, else its type
and attributes
- natives carry an optional _doc_ string (cat_types_native_new_doc);
stdlib builtins documented
- len() handles lists
- examples/reflect.cat + 8 assertions wired into run_tests.sh (77 total)
- '::' accesses a static/class member (here the module namespace ffi),
'.'/':' sends to an instance. ffi is a module, so ffi::load is the
canonical form; the native now accepts the receiver passed by '::'.
- example, tests and README use ffi::load; '.load' still works (compat).
- 69/69 tests
- std/ layout: std/lang/{lexer,parser,checker,compiler}.cat moved from src/catscript
- std/io/io.cat, std/fs/fs.cat, std/math/math.cat modules
- use "path.cat": import another unit (compile+run in the same VM)
- class NAME [extends BASE] ... end: methods, inheritance via __index,
default new constructor (runs optional init), tables are callable
- examples/classes.cat, tests/std.cat; 48/48 tests
- Modelo de objetos Cat_Value + vtable (interfaces abstratas)
- VM de bytecode, sem GIL (VM por-thread, nativas como valores)
- Stdlib com TOML embutido (toml_parse/toml_encode)
- Família de arquivos: AbstractFile (abstrata), File::open, StringIO, BytesIO
- Front-end (lexer/parser/checker/compiler) implementado em catscript
- cpk (cat package manager) como primeiro programa; manifest package.toml
- Type hints advisory, inclusive DynSized() e sentinel_sized<...>
- 25/25 testes passando (make test)