News for hackers. Stuff that matters.
Re:Pointer Free Programming and the Future of Nim by userbinator on Friday October 20, 2017 @06:32AM (#15514737)
The syntax and title reminds me of standard Pascal, which has very constrained pointers that, among other things, you can't do arithmetic with --- eventually leading to code that basically reinvents memory itself by using a large array and lots of indexing operations.

(Look at Donald Knuth's TeX for an example of this style.)

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 ...)

Re:Pointer Free Programming and the Future of Nim by dom96 on Friday October 20, 2017 @07:14AM (#15514861)
> But you can't do pointer arithmetics in Nim.

Actually you can, by using casts.

Re:Pointer Free Programming and the Future of Nim by mratsim on Friday October 20, 2017 @01:33PM (#15517609)
Oops, I obviously meant "you can" but I probably typed too fast :P