4 ms·
I looked at the source code but I wish I could understand what makes it beautifully elegant. I was pondering this question before as I was learning rust, and ho
by Exuma 2y ago
I looked at the source code but I wish I could understand what makes it beautifully elegant. I was pondering this question before as I was learning rust, and how tricky it was (decision overload) to make just a snake game (regarding code structure). I then was thinking how one would build a UI, functions which operate on a "space", and I thought of photoshop specifically, or 3d studio max. So finding this repo was really cool, except I simply just don't understand it.
If anyone knows of good resource I could learn code structure LMK! I find it interesting just from a learning perspective, as I always try to increase my design pattern chops
- logdahl 2y agoI can't say much about this code or your personal background, but my honest opinion is to take a step back and examine the principles. I used to be very bothered by abstractions, design patterns and structure. But I realized that when I worked with 'true' imperative code (forget classes for a while), keeping all code in the same file, the code started to structure itself. I am not saying this is the only way, but I feel like OOP can be a hinderance, as you get bogged down by alternatives.
- mannyv 2y agoIt uses MacApp, which was one of the first frameworks that tried to handle all the boilerplate for you. The basic structure of MacApp apps is a document, and the MacApp framework dispatches events to your handlers. It's been forever since I worked on a MacApp app, but I think that's the basic structure. It sounds like the MacApp stuff isn't included, but it's probably out there somewhere. I know at some point Adobe ported MacApp to Windows so they didn't have to rewrite everything. I expect at some point they replaced MacApp with their own abstraction layer.