Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 1.5 KB

README.md

File metadata and controls

31 lines (26 loc) · 1.5 KB

oop-in-c

Object-oriented C

Why?

I'm doing this to learn and because I'm curious. I'll probably get bored with things eventually.

Things planned

  • basic object system (single inheritance)
  • non-instantiable types
  • interfaces/abstract classes
  • generic values
  • parameter specs
  • generic classes? (ex: HashMap<K,V>)
  • more stuff (closures?)

Further comments

It would be nice to have some way of storing type parameters for classes. This is something that I don't think GObject does (it does have type parameters for properties, though). That way, a HashMap would throw exceptions if given the wrong type. It would also be nice to do this for certain non-instantiable types ("primitives") without boxing.

Things to look into

  1. dynamic type system
  2. Java reflection with generics
  3. GParamSpec
  4. C11's _Generic
  5. Object Oriented Programming with ANSI C
  6. GObject Memory Management
  7. libffi
  8. Java super type tokens