Just jotting down differences from sokol_app here:
- C's "everything is an int" is still awful.
- RAII makes life SO MUCH EASIER
- Because of that we don't need wonky multi-stage constructors and destructors
- Or state variables to keep track of whether or not something is initialized
- Not allowing things to create invalid values is so much easier -- Option where you need it, dawg
- The Default trait makes life so much easier
- Structs of function pointers as vtables is sometimes honestly more convenient than traits
- And sometimes not, they're basically trait objects
- Having a real stdlib with things like Vec::with_capacity() and mem::zeroed() and panic!() are real effin' nice -- lots of C code reinvents the same damn wheels over and over.
- C encouraging everything to be static's is basically horrible...
- ...and part of that is due to lack of generics and other powerful type systems
- People get antsy when cargo downloads 200 crates but nobody seems to care when
apt install xorg-devchucks 30 MB of header files into random places
- ifdef's are basically awful, and C's lack of modules makes them more common
- The best C API doc generator is
sapp_desc type TODO: Pull functions out into a trait or such
TODO: Not make it heckin' C
Framebuffer config info for OpenGL
Basic application context, should be toplevel type where state lives.
Semi-experimental refactor of Event type to use real enums instead of C BS.
key codes are the same names and values as GLFW
Modifier keys. TODO: Bitflags crate???
Basically the public API, the sapp_*() functions in Sokol Backends implement this, for now.