Skip to content

Make Objective-C codebase smaller #103

@wokalski

Description

@wokalski

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    macOSmacOS renderer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions