Timothee Cour

Results 450 comments of Timothee Cour

using an object after it was destroyed but that lives in the same stack frame is a different kind of problem than using memory that was allocated in a different...

> Your example relies on the fact that seqs can't be nil. Replace the seq with a ref or a ptr. It will crash. it doesn't change the example fundamentally,...

> Keep in mind you don't know what the destructor will do with the pointer/ref; destructors do not have to reset their target anymore. I know, but like i said,...

> https://github.com/nim-lang/Nim/pull/14976#issuecomment-658093473 @Araq tracking now works for function calls, both through params and result, and also works for functions that don't return anything. This makes a number of previously failing...

> If you want reviews, un-draft your PRs. :-) done, some files are needed for debugging and will be removed for final version so ignore those: * compiler/debugutils.nim * compiler/debugutils_basic.nim...

```nim var s: seq[int] var x = keepVarness(s[i]) x = 4 # ok, mutate s[i] setLen s, 0 x = 4 # invalid write! ``` @araq I don't understand this...

@Araq {.views.} is easily fooled, eg this will compile and bypass the mutation check: ```nim proc dangerous(s: var seq[Foo]) = let meh: lent Foo = s[0] proc bar() = echo...

> no spec and not even a draft of a spec (!). I will add a spec.

I don't mind changing to something else but I'd rather do it just once after consensus reached; I'd still like to minimize indents if possible; another option: ``` got X...

actually, compiler uses this internally: ``` actual X formal Y ``` seems like a good choice