Implementation status
Real compiler. Early language.
Dewy is under active development and has no stable release yet. This page gives the useful short version; the repository carries the detailed feature checklist.
Works through code generation today
- Declarations, lexical scopes, top-level execution, modules, imports, and a source prelude
- Fixed-width integers, exact literals, booleans, structural function types, and bounded generic type aliases
- Direct and indirect calls, recursion, overloads, named arguments, and per-call positional-or-named defaults
- Conditional values, loops, labeled exits, ranges, and logically combined range/grapheme iterators
- Homogeneous arrays with statically or flow-proven indexing,
end, and fixed-range slicing
- Structural objects, mutating object methods, optionals, and flow-sensitive narrowing
- Unicode grapheme strings, slicing, iteration, representation-changing views, and streamed interpolation
- All eight base dimensions with a canonical-scale unit catalog (SI units, prefixes,
N/J/W, degrees and turns), dimension algebra through * / ^, and cos/sin/tan
- Exact rationals (
1/3, decimal literals), Q32.32 fixed-point, integer and rational powers, and proof-based 64-bit lowering of abstract int
- Growable arrays (
push/pop/insert/truncate/sort) with proven indexes, and runtime-length arrays as results and object fields
- Dictionaries and sets as values: insertion order, compact hash tables, proven-key lookups,
get/pop with defaults, keys/values, and set algebra
- Liquid refinements on bindings (
int< i=>i>?0 >, array< length>?0 >) with proven/refuted/unknown diagnostics; exhaustive is? chains
- Target-gated imports (
$target, $supported_targets), main(args), and file I/O on Linux
Important limits
- Abstract
int is arbitrary precision: values proven to fit are 64-bit words, everything else is a big integer (dewy analyze reports where). Word-sized signatures still need a proof or an explicit bigint.
- Capturing local functions are analyzed but do not lower as closures.
- Recursive union members, user-defined generic functions, effects, error values, and pattern matching are not complete; floating-point arithmetic is deliberately absent.
- Runtime-sized storage uses a single process arena; deterministic release and scoped arenas are designed but not built.
- Host capabilities and the Dewy prelude are not portable across every µDewy backend yet.
- The public documentation contains aspirational syntax and is being separated from the implemented reference.
Current direction
NowCompiler convergence
Stabilize the new typed compiler, µDewy lowering, module system, installation path, and behavior parity.
NowRepresentation analysis
Use bounds, alias, and lifetime facts to choose safe compact layouts and calling conventions.
NextClosures, errors, memory
Lower closures, add error values, then deterministic release and scoped arenas on the ownership model.
Long termAuditable self-hosting
Complete the path from a small trusted bootstrap through µDewy to a full compiler written in Dewy.
Future features
- Rationals over big integers, plus real, complex, and quaternion numbers.
- Display units for printing quantities,
as unit, offset units, library-declared dimensions, broadcasting, and multidimensional arrays.
- Bidirectional maps, container equality, and user-defined generic containers implemented in Dewy itself.
- Refined parameters and results, checked proofs, and
unsafe claims.
- First-class interpolation materialization and conversion hooks, pattern matching, effects and error values, generators, and unpack-and-collect syntax.
- Partial application, compile-time evaluation, and metaprogramming.
- A portable standard library, packages, versioned releases, and installers for more platforms.
- A Dewy language server, formatter, richer editor tooling, and a full Dewy browser playground.