4 ms·
I saw this beautiful hack to get around this: ``` struct MyClass1 ... end MyClass = MyClass1 ``` Then, whenever you need to change MyClass, just add 1
by jarbus 4y ago
I saw this beautiful hack to get around this:
```
struct MyClass1
...
end
MyClass = MyClass1
```
Then, whenever you need to change MyClass, just add 1 to the version number of MyClass in those two or three instances, and the repl will just compile MyClass2 as a new class to be used for all future calls in the repl.
- freemint 4y agoNot good if you want to also know stuff about the algorithms performance as that assignment is now accessing a global vs accessing a const.