Andrea Ferretti

Results 160 comments of Andrea Ferretti

Also, consider that the threading model is intertwined to the memory and garbage collection model. For instance, Nim (in default mode) exposes separate garbage collected heaps for each thread, and...

Agreed, that would be nice, and it should pretty straightforward to add. Unfortunately, I have little time these days to work on Nim projects, I am not sure I will...

One thing that is not documented is how to turn assertions and invariants off (I assume there should be such a flag, not unlike normal assertions are eventually removed from...

That would be nice, but would be much more sophisticated. This is just a simple memoization macro, not a full-fledged cache. Deleting the cache is useful between one call to...

I wanted to do this, but couldn't find the time these days. If you are willing to open a PR, that would be ok for me

Hi @AritraBanik08 , what do you mean by "is not working at all"? I just ran the test for this function [here](https://github.com/andreaferretti/rosencrantz/blob/master/tests/client.nim#L326-L329) and it passes along with all other tests....

It makes sense, you can only memoize a concrete function. I don't know if there is a workaround Il Dom 10 Apr 2022, 14:01 Francesco Giannelli ***@***.***> ha scritto: >...

You are right, adding in next version

The best way would be for the macro to handle the visibility modifier. But for now, what you can do is define a private memoized function, which should work fine,...

Well, in this case yes, but I think one may very well want to perform side effects in consts - for instance read something by a configuration file and have...