The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
0answers
43 views

Lua OOP and classically-styled prototypal inheritance

I want to do some object-oriented programming in Lua, and I decided on something like this: local B = {} -- in real life there is other stuff in B B.Object = { constructor = function() end, ...
3
votes
1answer
217 views

Improve Syntax & Structure

I'm building a small web application and it's starting to get a bit complex. I have reached to a point where I have to run some tests and load some libraries. I made it so I can use it in this way : ...
5
votes
1answer
218 views

Javascript inheritance

I have a simple class inheritance in JS: var Class = function(){}; Class.extend = function(){ var Extended = function(constructor){ function extend_obj(destination, source) { ...
0
votes
0answers
110 views

Implementation of Javascript Classes and Inheritance

I've created a simple Javascript library to be able to create "classes" and extend them defining instance and static methods and variables. It consists in a simple function Class with two methods: ...
0
votes
0answers
108 views

“metaconstructors” for inheritance in js?

Edit - decl smokes dojo.declare - http://jsperf.com/dojo-declare-vs-decl The code has been updated a bit. decl now accepts object literals as well, although I still like "declaration functions" ...
3
votes
1answer
251 views

“Class” design in javascript

I'm a systems programmer teaching myself javascript. Prototypal inheritance is completely new to me, so I could use some best practices advice here. I made a simple game (breakout) for my first ...