Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Such code will generate warnings, "arrays of references need to be initialized right away, therefore `len:` cannot be used (unless inside `unsafe`, or if you also use `init:`)". By the way, the other optional parameter, besides `len` and `cap`, is `init` (in the documentation too). The person is being told to use unsafe or do something else.

Warnings are given to allow the programmer to experiment or solve by other methods. Beta means language still in development. Lastly and for V, the warnings mean that in production mode (-prod flag), that kind of code will not compile.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: