Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 2.04 KB

File metadata and controls

47 lines (33 loc) · 2.04 KB

Dasy Suggestions Implementation Progress

This file tracks the implementation of items from main/suggestions.md.

Status legend: [x] done, [~] in progress, [ ] pending

Macro System (define-syntax / syntax-rules)

  • Add macro core (Syntax, MacroEnv)
  • Implement syntax-rules matcher (expressions + lists, ellipses)
  • Add expander and define-syntax handler
  • Wire expander into parse_src
  • Register builtin Dasy macros (cond, doto, when, unless, let)
  • Port thread macros (->, ->>) to Dasy macros (procedural)
  • Port doto to Dasy (procedural; returns (do ...))
  • Port field/data access macros: set-in, get-at
  • Add list + variadic variants: get-at!, set-at, set-at!
  • Port set-self to Dasy (procedural; emits (do ...) of sets)
  • Flip order and deprecate Hy macros in docs
  • Optional: add syntax-case

Syntax Ergonomics

  • Keep canonical attribute/method forms: (. obj field) and (. obj method args ...)
  • Consider removing (. None method) special-case from core (kept for now for compatibility)
  • Document pipelines (->, ->>) and doto as preferred idioms

Keyword Arguments

  • Parser already supports :kw val at call sites; examples/tests continue to pass
  • Expand docs and tests to showcase call-site kwargs broadly

Core Surface Tightening

  • Trim ALIASES to spec-level essentials (remove setv, shift quote handling into parser)
  • Dispatch table simplification (follow-up cleanup)

Notes / Next Steps

  • Keep Hy macros working alongside the new expander until feature parity is reached.
  • Next focus: trim ALIASES and consider removing the (. None ...) special-case after users migrate to Dasy-native doto/threads. Optional: simplify dispatch table.
  • After parity, update docs and examples to prefer Dasy-native macros, then retire Hy macros.

Compiler Extension Macros

  • Port include! to Dasy (recursion guard; base-dir aware path resolution)
  • Port interface! to Dasy (compiles target and injects (definterface ...))