Tiny v0.2.1 - Strong Typing and Networking Update
Tiny v0.2.1 - Strong Typing and Networking Update
This version introduces a revolutionary strong typing system for arrays, recursive dependency management, and a significantly enhanced HTTP standard library. Multilevel caching has also been implemented to drastically improve development performance for large projects.
Language and Type System
- Typed Arrays (
array:T): New syntax for specifying array element types. The compiler now provides deep type checking, supports nested structures (e.g.,array:array:string), and automatically infers return types for array operations likepush,pop, andget. - Deeply Nested Namespaces: Removed restrictions on namespace depth, allowing for more sophisticated module organization.
- Enhanced Default Parameters: Function default arguments now support array and object literals with support for deep nesting.
- ANSI Escape Support: The lexer now supports the
\eescape sequence for building rich CLI applications.
Dependency and Tooling
- Recursive Dependency Installation:
tiny installnow automatically resolves and installs the entire dependency tree, ensuring environment consistency. - Lockfile Optimization: Improved
tiny.lockgeneration with precise dependency resolution based on the project root. - Target-Aware Packaging: The packager now automatically filters native plugins based on the target platform (Windows, Linux, macOS), significantly reducing distribution sizes.
- Dependency Caching: Optimized local caching logic for faster secondary installations and cross-project development.
LSP and Developer Experience
- Multilevel Performance Caching: Introduced scope and document block caching, greatly improving completion and diagnostic response times in large source files.
- Library Auto-Imports: The LSP now discovers and suggests classes, functions, and constants from local libraries and installed dependencies, automatically inserting the required import statements.
- Loop Variable Intelligence: Improved scope recognition and type inference for iteration variables in both standard
forandfor-inloops. - Improved Hover Resolution: Optimized hover logic for declaration members, resolving conflicts between interface fields and global functions with the same name.
Runtime and Standard Library
- HTTP Module Overhaul:
- Added native support for
PUT,PATCH, andDELETEmethods. - Introduced
staticrouting for serving entire directories. - Added helper functions for
HTML,Redirect,File, andDownloadresponses. - New security configurations including
readTimeoutMs,writeTimeoutMs, andmaxBodySize.
- Added native support for