Closed hyperfocusaurus closed 6 months ago
The reason is that sometimes I did this to get around V's cyclic importing restrictions.
Ah gotcha, ok. I'll close this now then, but hopefully it'll serve as a reference if anyone else gets confused by the same thing.
Hi there! I'm using VINIX to learn how to write an operating system, and in the process of porting the event subsystem into my own OS I spotted a bit of a strange calling convention in the event.v file.
On line 79, there's a C function declared called
event__trigger
, which is then called on line 94. I believe this is actually calling the V functionevent.trigger
from the event module, however it is doing it using the calling conventions used for calling into C code for some reason. It gets away with it because of the way Vlang clobbers function names (module.function -> module__function) making it actually a "valid" call, but this exposure of V's internals is potentially unstable so I thought I'd bring it to your attention.If there's an actual reason behind this, or if I'm misunderstanding something, I'm happy to be corrected!