Skip to content

Commit 4fd58df

Browse files
author
Your Name
committed
review
1 parent ad6baa7 commit 4fd58df

File tree

3 files changed

+187
-189
lines changed

3 files changed

+187
-189
lines changed

languages/tolk/from-func/in-detail.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,10 @@ Arithmetic operations on `coins` degrade to `int` — for example, `cost << 1` o
286286

287287
### Type system changes
288288

289-
FunC's type system is based on Hindley–Milner, a common approach for functional languages where types are inferred from usage through unification.
290-
291289
In Tolk v0.7, the type system was rewritten from scratch.
292290
To introduce booleans, fixed-width integers, nullability, structures, and generics, Tolk required a static type system similar to TypeScript or Rust.
293291

294-
Hindley–Milner conflicts with structure methods, struggles with proper generics, and becomes impractical for union types despite claims that it was _designed for union types_.
295-
296-
The types ae:
292+
The types are:
297293

298294
- `int`, `bool`, `cell`, `slice`, `builder`, untyped `tuple`
299295
- typed tuple `[T1, T2, ...]`
@@ -319,7 +315,7 @@ The type system obeys the following rules:
319315

320316
### Clear and readable type mismatch errors
321317

322-
In FunC, due to Hindley-Milner, type mismatch errors are hard to interpret:
318+
In FunC, type mismatch errors are hard to interpret:
323319

324320
```
325321
error: previous function return type (int, int)

0 commit comments

Comments
 (0)