Re: Changing chained attributes of object taken by var - Is this desired behaviour?

2017-08-06 Thread PeterSR
I must have been tired when I wrote this code. I am pretty certain that I understand how the indirection works now. I just remember thinking that it was super weird that I could change something and then another variable suddenly changed its contents. But of course they pointed to the same

Changing chained attributes of object taken by var - Is this desired behaviour?

2017-08-06 Thread PeterSR
Consider the following code to create linked list-like structure: type A = ref AObj AObj = object id: int parent: A child: A proc `$`(a: A): string = $a.id proc takeAsVar(curr: var A, next: A) = if curr == nil:

Re: REPL?

2017-03-06 Thread PeterSR
@Fungi: Scala and Haskell are both compiled languages that have REPLs. But I can only speculate how they got it to work.