Should we implement classes? This issue is tied to dot operators as well.
If we had classes, then we could call functions using the dot operator:
Option 1
var x = [ 1, 2, 3, 4, 5 ];
x.length;
Otherwise, we would have to pass in the thing we are performing the function on.
Option 2
var x = [ 1, 2, 3, 4, 5 ];
length(x);
Option 2 is essentially already implemented for us. We just need to add two lines of code in one file.
Option 1 would require us to implement a whole new feature of having Classes, which wouldn't be that much, but do we have time for that?
Should we implement classes? This issue is tied to dot operators as well.
If we had classes, then we could call functions using the dot operator:
Option 1
Otherwise, we would have to pass in the thing we are performing the function on.
Option 2
Option 2 is essentially already implemented for us. We just need to add two lines of code in one file.
Option 1 would require us to implement a whole new feature of having Classes, which wouldn't be that much, but do we have time for that?