You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We believe that a language is only as good as the feedback it provides to the developer. Our latest update focuses on transforming Wave into a more mature and user-friendly tool by introducing powerful control flow constructs and a world-class diagnostic system.
1. Rust-Style Advanced Diagnostics
The highlight of this release is our completely rewritten error reporting infrastructure. We’ve moved away from simple, one-line error messages to a rich, context-aware diagnostic system.
Source Snippets & Carets: Errors now display the relevant part of your source code, highlighting the exact location of the issue with caret markers (^) and providing multi-line context.
Error Codes: We’ve introduced unique error codes (e.g., E1001, E2001). These codes make it easier to search for documentation and troubleshoot common issues.
Panic-Guarded Runner: Our new runner can catch backend failures and use source-location inference to map low-level LLVM errors back to the specific line in your Wave source code.
2. Powerful Control Flow: The match Statement
Pattern matching has arrived! Wave now supports the match statement, allowing for cleaner and more expressive conditional logic compared to long if-else chains.
Efficient Lowering: The compiler translates match statements into highly efficient LLVM switch instructions, ensuring that your code remains fast even as logic grows complex.
Pointer Safety with null: We’ve officially introduced the null keyword. Unlike simple integers, the null literal is semantically restricted to pointer types (ptr<T>), preventing accidental misuse in arithmetic logic.
3. Scaling Up: New Dependency Management
As your projects grow, so does the need for external libraries. We’ve introduced a formal dependency resolution system to help you manage multi-package projects.
External Packages: Using the new --dep and --dep-root CLI flags, you can define external package paths.
Namespaced Imports: Wave now supports namespaced imports like import("pkg::module"). The compiler will search across your defined dependency roots to find and link the correct files automatically.
4. Hardening the Frontend: Lexer & Parser Robustness
We’ve performed a deep refactoring of our frontend to ensure that no error goes unnoticed.
Result-Based Propagation: The lexer and parser now return Result<T, ParseError> everywhere. This ensures that failures are propagated precisely, allowing the new diagnostic system to give you better feedback.
Nested Comments: By popular demand, Wave now supports nested multi-line comments (/* ... /* ... */ ... */), making it easier to comment out large blocks of code that already contain comments.
Better Validation: We’ve improved escape sequence validation in string and character literals, catching invalid sequences at compile time.
5. Backend Refinements
The LLVM backend has been updated to support the new language features while maintaining our commitment to performance:
Type Narrowing: We’ve reinforced the rules against implicit narrowing in assignments and returns, ensuring that your code is type-safe.
Optimization Alignment: Our optimization pipeline has been normalized, with -Ofast now consistently mapping to -O3 levels for stable, high-performance output.
Conclusion
This update is all about Developer Experience (DX). Whether it's the clarity of our new error messages or the expressiveness of the match statement, Wave is now a much more powerful and comfortable language to build with.
Update your compiler today and experience a new level of productivity!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We believe that a language is only as good as the feedback it provides to the developer. Our latest update focuses on transforming Wave into a more mature and user-friendly tool by introducing powerful control flow constructs and a world-class diagnostic system.
1. Rust-Style Advanced Diagnostics
The highlight of this release is our completely rewritten error reporting infrastructure. We’ve moved away from simple, one-line error messages to a rich, context-aware diagnostic system.
^) and providing multi-line context.E1001,E2001). These codes make it easier to search for documentation and troubleshoot common issues.2. Powerful Control Flow: The
matchStatementPattern matching has arrived! Wave now supports the
matchstatement, allowing for cleaner and more expressive conditional logic compared to longif-elsechains.matchstatements into highly efficient LLVMswitchinstructions, ensuring that your code remains fast even as logic grows complex.null: We’ve officially introduced thenullkeyword. Unlike simple integers, thenullliteral is semantically restricted to pointer types (ptr<T>), preventing accidental misuse in arithmetic logic.3. Scaling Up: New Dependency Management
As your projects grow, so does the need for external libraries. We’ve introduced a formal dependency resolution system to help you manage multi-package projects.
--depand--dep-rootCLI flags, you can define external package paths.import("pkg::module"). The compiler will search across your defined dependency roots to find and link the correct files automatically.4. Hardening the Frontend: Lexer & Parser Robustness
We’ve performed a deep refactoring of our frontend to ensure that no error goes unnoticed.
Result<T, ParseError>everywhere. This ensures that failures are propagated precisely, allowing the new diagnostic system to give you better feedback./* ... /* ... */ ... */), making it easier to comment out large blocks of code that already contain comments.5. Backend Refinements
The LLVM backend has been updated to support the new language features while maintaining our commitment to performance:
-Ofastnow consistently mapping to-O3levels for stable, high-performance output.Conclusion
This update is all about Developer Experience (DX). Whether it's the clarity of our new error messages or the expressiveness of the
matchstatement, Wave is now a much more powerful and comfortable language to build with.Update your compiler today and experience a new level of productivity!
Beta Was this translation helpful? Give feedback.
All reactions