Two questions #252
Replies: 3 comments 3 replies
-
It would be indeed nice to have a mutable vector, but I think it needs to be a separate type, something like |
Beta Was this translation helpful? Give feedback.
-
#550 is open now to solve the issue of adding set/update to vectors to mutate in place if unique. As far as There is no standard effect for a It is a good question whether the standard |
Beta Was this translation helpful? Give feedback.
-
I had the same thought about intercepting Line 34 in 39b4bec (but that feels like a hack around the fact that is't not a handleable effect, which does seems like a strange choice to me too) Also if you're looking at test frameworks, be aware that the community one lives here: https://github.com/koka-community/std/tree/main/test |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why can I only modify a vector inside a local-var? That is why is there no function:
Given perceus / reference counting this should be efficient and would allow one to implement for example a classic hash table efficiently?! (This was actually what I wanted to try as my first experiment with koka but immediately failed with this road-block).
Why is the console effect internal? That is I thought it would be neat to implement a expect testing framework (similar to https://github.com/janestreet/ppx_expect) for koka, where a test is a function with console effect, but the calling function intercepts the writes to the console to compare against the expected string. But again that seems to be impossible not for a deep reason internal to koka but let's called implementation choices.
Did I misunderstand something?
Beta Was this translation helpful? Give feedback.
All reactions