-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Description
mut and or_default should be removed entirely from the naml language.
mut
varis already mutable by default —mutis redundantconstis immutable — no need for amutcounterpart- Struct method receivers (
pub fn (mut self: T)) should always be mutable —mutadds unnecessary ceremony
Related: #26 (var mut should error), #28 (remove mut from receivers)
or_default
This feature should be removed from the language entirely.
Scope
Areas to clean up across the codebase:
- Lexer: Remove
Keyword::Mut(andKeyword::OrDefault/or_defaulttoken if it exists) - Parser: Remove
muthandling inparse_var_stmt(statements.rs),parse_receiver(items.rs), and anyor_defaultparsing - AST: Remove
mutablefield fromReceiver, remove anyor_defaultAST nodes - Typechecker: Remove
mut/or_defaulthandling, make receivers always mutable - Codegen: Remove any
mut/or_defaultcodegen paths - Docs: Update
language-reference.mdto remove anymut/or_defaultreferences - Examples: Remove any usage from example files
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels