From 3b82596a7bb242ae4c311609f7f03056c9aa0f45 Mon Sep 17 00:00:00 2001 From: flaviut Date: Wed, 22 Oct 2014 13:31:41 -0700 Subject: [PATCH] Updated Common Criticisms (markdown) --- Common-Criticisms.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common-Criticisms.md b/Common-Criticisms.md index 5cad11e..b974ee0 100644 --- a/Common-Criticisms.md +++ b/Common-Criticisms.md @@ -4,7 +4,7 @@ This is referring to systems like C#'s: `void foo(ref int myInput){...}; foo(ref Possibly. The problem here is that of perception. In many languages, heap allocation through pointers is the only method of having objects, and passing them to a function gives the freedom to modify them. In Nim, things can be allocated on the stack, and those things need to be treated in the same way as things on the heap. ``` nimrod -proc foo(input: ref T) = ... +proc foo(input: var T) = ... let a: ref T = ... foo(a) # valid, this is Java-style var b: T = ...