> Then, I need to import this C var into nim? This does not look like a good 
> idea.

Yeahh, in my project I'm using this pattern all over the place, because it's 
basically the only option right now. It works but it's cumbersome, I'm looking 
forward to the day when Nim has a proper solution to this.

I think implementing a `{.readonly.}` pragma for `let` variables is the best 
course of action. Having the compiler auto-detect cases where the readonly 
codegen can be applied would be a nice extra, but I don't think it really adds 
much. As embedded users, I think we would prefer to be explicit about these 
things, right?

At some point Araq said _" You write an RFC, we implement it."_ so I did, but 
then that changed to _" you implement it"_ which uh, I'm not against trying but 
I don't think I can find the time for it right now. If someone more experienced 
with the Nim codebase could take over and get this done, I'd really appreciate 
it.

Reply via email to