jnz / q3vm

Q3VM - Single file (vm.c) bytecode virtual machine/interpreter for C-language input
GNU General Public License v2.0
830 stars 57 forks source link

Request: Better name for VMA_? #23

Closed SirJson closed 6 years ago

SirJson commented 6 years ago

The problem I see is for people who are writing bindings to your library and are new to the Project.

I don't think you can know what VMA means but you have to re-implement the macro that calls VMA_ in some way.

I actually also had to think for a moment what VMA means and I already wrote working bindings to the library. Unfortunatelly VMA_ doesn't make it better. With VM_ArgPtr it was quite clear what the function was doing.

If you want to keep the VMA_ I think it would be of great help for people writing bindings if you explain those three letters. I know there is already documentation for the macro but you can easily overlook it because you usually can't get bindings to them.

I would do it myself and send you a pull request but I'm not sure why you changed it to VMA_ since there is already a convenience macro with the same name. I would just go back to VM_ArgPtr because for me it was immediately clear what it does but maybe someone else got a better name?

Also doesn't break the pseudo namespacing that is happening in vm.c? Almost everything is prefixed with VM_

jnz commented 6 years ago

I think you are right. Going back to VM_ArgPtr is also consistent with Quake3. I‘ll change it. Thanks for the feedback.

jnz commented 6 years ago

Commit a18c027c8ebc57b1e996c6e987c74129b4482691 goes back to the old name (from VMA_ to VM_ArgPtr)

SirJson commented 6 years ago

Cool! I think you saved someone in the future from some headache. I will update my crate as soon as possible to reflect that change.