Objectively: OO framework for GNU C
Posted: Mon Jan 12, 2015 2:01 am
Recently I had the idea of building an MVC framework atop SDL2 and OpenGL for (primarily) games. I'm fond of Apple's Foundation and UIKit frameworks, and thought modeling mine after those might be wise. To do that faithfully, retaining most of the idioms that make those frameworks sing, I needed OO, but I'm not a fan of C++.
So I started hacking on an OO implementation in C:
https://github.com/jdolan/objectively
Features:
http://jaydolan.com/projects/objectively/hierarchy.html
With Foundation mostly implemented, I'll be starting on UIKit soon. It should get really fun from there on in. So that's that. Questions, feedback, etc.. very welcome.
So I started hacking on an OO implementation in C:
https://github.com/jdolan/objectively
Features:
- Single-parent inheritance through starts-with structure composition
Class and instance methods with strongly typed interfaces
Automatic class loading and lifecycle management
Automatic memory management with reference counting
Object primitives for Boolean, Date, Null, Number, String
Mutable and immutable collections variants such as Array and MutableDictionary
JSON parsing, marshaling and introspection with JSONSerialization and JSONPath
Low-level concurrency constructs such as Lock, Condition, and Thread
High-level concurrency with Operation and OperationQueue
Resource loading via Internet protocols with URLSession and URLSessionTask
http://jaydolan.com/projects/objectively/hierarchy.html
With Foundation mostly implemented, I'll be starting on UIKit soon. It should get really fun from there on in. So that's that. Questions, feedback, etc.. very welcome.