interkosmos/fortran-sdl2

underscores in function names

freevryheid opened this issue · 2 comments

I notice that some of the functions have trailing underscores - any reason for this?

I also notice that you opted to include the "sdl_" prefix in front of function names (as the c library does). While I see the possibility of conflicts for functions like init and quit, the other function names are really unique. Any reason why you opted to not strip this prefix?

Sorry if these questions come across as confrontational - it's not my intention. I really appreciate the work you've put into this and was just wondering.

I notice that some of the functions have trailing underscores - any reason for this?

Procedures with a trailing underscore are plain ISO C binding interfaces. They require a wrapper to be interoperable in Fortran (each declared in sdl2.f90) which conveniently have the same name but without the underscore at the end.

Any reason why you opted to not strip this prefix?

As you wrote, simply to stay close to the C library, and in order to make porting code from C to Fortran easier.

Thanks, good to know,