بنقرة واحدة
author-code
// Conventions for authoring Rust code in the Dada compiler. Use when writing or modifying Rust code, adding functions, or making implementation changes.
// Conventions for authoring Rust code in the Dada compiler. Use when writing or modifying Rust code, adding functions, or making implementation changes.
| name | author-code |
| description | Conventions for authoring Rust code in the Dada compiler. Use when writing or modifying Rust code, adding functions, or making implementation changes. |
///) with high-level explanation/// Type checks a method call expression like `obj.method(args)`.
///
/// # Example
/// ```dada
/// let p = Point(x: 10, y: 20)
/// p.distance(other) # <-- we are type checking this
/// ```
///
/// The method resolution follows these steps:
/// 1. Determine the type of the receiver (`p`)
/// 2. Look up the method in the type's namespace
/// 3. Check argument compatibility
fn type_check_method_call(...) {
// Step 1: Get receiver type (Point in our example)
let receiver_ty = self.type_of(receiver);
// Step 2: Resolve method - this handles the lookup of `distance`
// in the Point type's method table
let method = self.resolve_method(receiver_ty, method_name)?;
}
💡)Use 💡 comments to capture non-obvious constraints and reasoning for future sessions.
💡 comments: pause and consider whether the reasoning affects your planned changesAnnotate non-obvious decisions — skip self-explanatory code:
// 💡: Using a loop to iterate through items// 💡: Using manual iteration instead of map() to handle partial failures gracefullyDocument constraint-driven choices:
// 💡: Using async/await for the API call// 💡: Using async/await because this API has 2-second response times that would block the UIDocument tradeoffs and alternatives:
// 💡: Using Redis instead of in-memory cache because we need persistence across server restartsCapture consistency requirements:
// 💡: Using Result<T, E> pattern to match error handling in auth.rs and database.rs modulesdada-ir-astdocs/overview.md included via #![doc = include_str!(...)]cargo doc --open to browse implementation docsRFC and specification workflow for Dada language features. Use when working with RFCs, writing spec paragraphs, or tracking implementation progress.
Track context across sessions for long-running features. Use when starting multi-session work, checkpointing progress, or resuming work on a feature tracked in a GitHub issue.
Run and interpret Dada test results. Use when running tests, debugging test failures, or understanding test output.
Write spec-aligned Dada tests. Use when creating new test files, organizing tests to match the specification, or adding test coverage for language features.