vlang / ved

1 MB text editor written in V with hardware accelerated text rendering. Compiles in <1s.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

discussion: why not make the things safe instead of marking them unsafe?

heavyk opened this issue · comments

it seems to me that I'd like to make abstractions which remove the need to type "unsafe" -- thereby making it safe, or acceptable.

to challenge myself, I decided to open the 2048 example and go through that...

gg          &gg.Context = unsafe { nil } // perhaps 'uninit' instead?

nevermind ... so disclaimer here, I've never programmed v before, and I have no idea really. this just looked like a fun discussion to put. I'm sure there are many other great solutions.