Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
doritosfan84
on April 3, 2020
|
parent
|
context
|
favorite
| on:
Nim 1.2
I see. I know nothing about Nim but I do see in their example they used var when declaring the function. This way seems like it's hidden to the consumer of the function but hopefully editor tooling helps with this.
juki
on April 3, 2020
[–]
You have to declare the variable as `var` as well, eg.
var arr1 = [4, 2, 3, 6] sort arr1 # Doesn't work let arr2 = [4, 2, 3, 6] sort arr2
You'll get a warning about the latter from the compiler (and nimsuggest for editors).
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: