Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Objective-C codebase smaller #103

Open
wokalski opened this issue Mar 29, 2019 · 0 comments
Open

Make Objective-C codebase smaller #103

wokalski opened this issue Mar 29, 2019 · 0 comments
Labels
macOS macOS renderer

Comments

@wokalski
Copy link
Member

I'm starting to notice a pattern where we put more and more logic on the objective-C side because it's more convenient/necessary. I believe we should strive to put almost everything in Reason to make the codebase more robust, simple, and approachable.

One way to address it would be dynamically creating Objective-C objects that you can create OCaml methods on - in runtime. Like this:

let tableViewDelegate = ObjectiveC.makeClass();
ObjectiveC.addMethod(
  Arity_3, 
  "tableView:willDisplayCell:animated:", 
  (self, tableView, cell, animated) => {
  
})

Somewhere else:

BriskTableView.setDelegate(tableView, tableViewDelegate.init());

This is just a sketch, it needs some deeper investigation. Especially how it relates to memory management.

@wokalski wokalski added the macOS macOS renderer label Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS macOS renderer
Projects
None yet
Development

No branches or pull requests

1 participant