Re:Pointer Free Programming and the Future of Nim
by pjmlp on Friday October 20, 2017 @08:24AM
(#15515190)
With the added benefit of bounds checking.
However all Pascal dialects had extensions for low level pointer manipulation.
Re:Pointer Free Programming and the Future of Nim
by mratsim on Friday October 20, 2017 @06:44AM
(#15514777)
Nim was written in Pascal at the very beginning.
But you can't do pointer arithmetics in Nim.
Either
- `type Foo = object` -> Value type, on the stack
- `type Foo = ref object` -> Ref type, managed by GC
- `type Foo = ptr object` -> Pointer type, manual memory management (malloc, free, memcopy ...)
(Look at Donald Knuth's TeX for an example of this style.)