News for hackers. Stuff that matters.
Re:V 0.3 by anderskaseorg on Friday July 01, 2022 @05:00PM (#31952833)
> Null is only allowed in unsafe code.

That’s clearly not the case, as the exact code in the post prints ‘&nil’ in current V master, and if you add a dereference you get a segfault (which someone else just filed as https://github.com/vlang/v/issues/14911).

> Overwriting of len was never fixed, because it was never an issue in the first place. The author made it up.

The home page claims the language has “no null (allowed in unsafe code)”. println(*[]&int{len: 1}[0]) is not marked unsafe, yet it still segfaults by dereferencing a null pointer. Can you explain why you say this was never an issue?

(I’ve filed this as https://github.com/vlang/v/issues/14914. A related issue in maps was filed a year ago: https://github.com/vlang/v/issues/10837.)

> It's always worked like in Go.

Go is not a language that claims to have no null.

There are no comments on this comment yet.