You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nim should enforce explicit initialization in all code paths rather than relying on default(T). This helps the optimizer, makes code easier to read/follow and can prevent minor bugs in the program logic. It also means that nil can only creep into your program when you write it explicitly, a good compromise given that the not nil annotation doesn't work well with generic containers like Table.
This will also fit the new move semantics perfectly well as we can use the same algorithm that detects "variable used before initialization" for "variable used after move".
jlombera, alapini, pmetras, hugosenari, FeldrinH and 2 moretimotheecour