uliwitness / Stacksmith

An intuitive software erector kit targeted at people new to programming, but with enough potential to stay useful once they've learned, inspired by HyperCard.
http://stacksmith.org
128 stars 13 forks source link

Update ObjC code to ARC? #97

Open uliwitness opened 5 years ago

uliwitness commented 5 years ago

It would probably make development a lot easier if we could make the code use Automated Reference Counting in our ObjC code. A few caveats though:

  1. We'd have to be careful in spots where we stick native objects in void *s to make sure they are still retained as ARC doesn't manage those
  2. How would our native calls (ObjC syntax in a Hammer script) work with this? Right now we just treat the returned object pointers like ints, but now we'd have to parse the annotations Swift uses and properly retain/release objects. OTOH these annotations weren't there when we started doing this.
  3. There's no point in porting the editor XIBs etc., as we'll replace them with Stacksmith stacks and parts anyway, long-term.
uliwitness commented 5 years ago

Also thinking about writing some new Mac code in Swift, but the bridging to C++ will probably be a bit annoying.