Page MenuHomePhabricator

Change reference objects to use prototypal inheritance
Open, LowestPublic

Description

Change reference objects to use standard JavaScript prototypal inheritance. Use methods attached to the prototype, rather than every object. It currently uses this style (attaching to each object), which we should switch away from:

this.getIcon = function () {

We should use OOjs for this (not OOjs UI yet, though).

Event Timeline

Sophivorus triaged this task as Medium priority.Oct 14 2016, 6:37 PM
Sophivorus updated the task description. (Show Details)
Sophivorus lowered the priority of this task from Medium to Lowest.Oct 25 2016, 4:50 PM

I hardly understand this request, and I don't see any benefits to it.

Sophivorus changed the task status from Open to Stalled.Oct 31 2016, 7:30 PM

Stalled until further explained.

The idea is that prototypal inheritance, e.g.:

proveit.Reference.prototype.foo = function ( bar ) {

(as used in OOjs and other JS code bases) may be more understandable (especially to JS developers just starting with the ProveIt code base), standard, and maintainable. I recall I ran into one or two code issues due to this kind of inheritance, but I don't recall the exact details.

Sophivorus changed the task status from Stalled to Open.Feb 5 2017, 10:18 PM

Thanks for the clarification.