The fact that I'm tackling another language where in if you want to use OOP (Object Oriented Programming) you have through a bunch of hoops is astounding. The fact that people actually specialize in this language is amazing. These people must hate their lives. In all honesty though, I have great respect for them.
function Scroller(stage){
this.far = new Far();
this.mid = new Mid();
this.viewportX = 0;
stage.addChild(this.far);
stage.addChild(this.mid);
}
Scroller.prototype.setViewportX = function(viewportX){
this.viewportX = viewportX;
this.far.setViewportX(viewportX);
this.mid.setViewportX(viewportX);
}
The fact that I have to go about writing an object with so much typing is beyond tedious. The class constructor I can understand--it actually makes sense. But when it comes to something simple like creating an instance based function instead of typing
function Scroller.setViewportX(viewportX)as expected, I have to add something called
prototypeWhat is prototype? I don't know, don't ask me. I could go on and on, but instead of hearing me complain about javascript, watch this video which will not only make you js developers laugh but roll your eyes because you understand what he's talking about.
LIFE IS TERRIBLE: LET'S TALK ABOUT THE WEB from Øredev Conference on Vimeo.
No comments:
Post a Comment