Updated Common Criticisms (markdown)

This commit is contained in:
flaviut 2014-10-21 16:14:09 -07:00
parent 1ed836880c
commit 11c671aafc
1 changed files with 5 additions and 3 deletions

View File

@ -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
```
```
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.