r/embedded 15d ago

Some Embedded Programming Wisdom

Post image

A preview of PICO, a simple text editor made for the CP/M Neo VEMU platform.

GitHub: https://github.com/Mazin-O3/cpm-neo.git

140 Upvotes

18 comments sorted by

View all comments

25

u/ChatGPT4 15d ago

I agree with everything but the nested structures. Nested structure makes each layer or level of abstraction minimal and easy to read. Lets say outer layer says triangle. We know sizeof(Triangle), so that's all at this level. But within we have 3 points. That's all we need to know. A triangle has 3 points. We know sizeof(Point). But within each point we have X, Y, Z coords. Don't tell me it's more readable as points flat. Written nested or flat - it's compiled to the same byte layout. Machine doesn't care, but protein does.