Use case:

I'm trying to make a really basic sdl2 library from scratch, that maps directly 
to the C version.

The C code declares this function:

Sdl_Quit

But there's also this constant:

SDL_QUIT

Due to Nim's style-insensitivity, I can't have both of these identifiers as is. 
eg they both start with a caps S, and otherwise look the same in terms of 
identifier name to the Nim compiler

Possible to get some kind of pragma to use strict styling rather than flexible 
styling?

eg something like this;

{.push strictStyle.}

proc Sdl_Quit() = ...

const SDL_QUIT = ...

{.pop strictStyle.}

Then those identifiers only ever get used in the code if you use the exact same 
naming, rather than eg, nim thinking the two are the same identifier.

Comments?

PS: My current temporary workaround is to name the SDL_QUIT constant, 
SDL_QUIT_CONST. But that means that I can't get a direct 1-1 mapping between C 
code and nim code (for instance).

Or is there perhaps some existing method, eg stropping, which already handles 
this kind of problem?

Reply via email to