Supun Setunga

Results 98 comments of Supun Setunga

Hi @bjartek, I had a quick look at this and have a question to help me clarify the problem. Does the below example correctly reflect the issue, or have I...

Excellent! Thanks for clarifying. Currently the second link doesn't overwrite, but rather returns with a `nil`. After the last line, if I then try to get the value at the...

After seeing the implementation I have a suggestion for a slightly modified version of the proposed API: Cross-posting from https://github.com/onflow/cadence/pull/1845#discussion_r933515481: >Would it be better to group these 'paths' related operations...

I'm yet to fully go through the FLIP. But as for the program cache problem, I think statically knowing the dependency graph is not always required. (Feels like going a...

@bluesign Yeah, I do agree, caching should be a separate problem (or shouldn't be a problem). i.e: internal details like caching shouldn't prevent Cadence language features. @dsainati1 also has a...

I think statically validating all scenarios is not possible. For e.g: see the following example (from a test-case I added for the reference implementation): https://github.com/onflow/cadence/blob/fd35cb13d5318adf45e0d4128c4b829acf595d9a/runtime/tests/interpreter/resources_test.go#L2736-L2747 ````cadence fun test(source: &[R], target:...

> ``` > let r > let ref = &r as &R > > account.save( // so we can thus also prevent anyone from using "ref" since we know it...

A draft implementation of this FLIP can be found at https://github.com/onflow/cadence/pull/1961

> In my opinion Stack to Stack should be invalid. ( if I understood stack correct, owner=nil ) > > Though I think they can be valid in the same...

This particular problem with pre/post conditions would be solved with the [purity/mutability analysis and restriction in function conditions](https://github.com/onflow/flow/pull/1056)