4 ms·
The code actually doesn't need documentation. It's written in a very clear, straight-forward manner that's easy to mentally parse. Very nice!
by GrooveStomp 15y ago
The code actually doesn't need documentation. It's written in a very clear, straight-forward manner that's easy to mentally parse. Very nice!
- AndresNavarro 15y agoAs a c programmer I find it quite odd/unnerving actually. It may be simple to understand its structure and it may look clean, but that isn't much to say of a project this size, especially if you know what it does. I found the file division & include pattern quite strange actually, and don't get me started in the cascading "if/else if" for the instruction dispatch: Not only is it almost impossible to optimize for the compiler, it's also more difficult to read than the obvious switch. Also, if the instructions were enums instead of defines, the compiler could even generate warnings when there are unimplemented opcodes. I don't use github but I'm tempted to make a branch and a pull request because it's driving me crazy! EDIT: I was about to fork it when I noticed that in the other two branches (fast & simple, default is master) the dispatch is implemented with a switch. Please somebody explain to me why this wasn't moved to the default branch...
- ehsanu1 15y agoPlease see http://hackerne.ws/item?id=2722896 http://hackerne.ws/item?id=2722896