diff --git a/Common-Criticisms.md b/Common-Criticisms.md index ecff558..3975230 100644 --- a/Common-Criticisms.md +++ b/Common-Criticisms.md @@ -3,8 +3,10 @@ Possibly. The problem here is that of perception. In many languages, heap alloca ``` nimrod proc foo(input: ref T) = ... -let a: ref T +let a: ref T = ... foo(a) # valid, this is Java-style -var b: T +var b: T = ... foo(b) # also valid and equivalent -``` \ No newline at end of file +``` + +Note that the difference between what happens in Java and what Nim does is simply a matter of efficiency: Nim does not require our `T` to be allocated on the heap. \ No newline at end of file