Mostly I've worked with JavaScript, but am currently working with C#. It occurred to me that when programming and taking into account object hierarchies, that in both cases I don't really know how the code is being executed.
When writing 'class' hierarchies in JavaScript I found that Java programmers were scandalized about defining these hierarchies external to constructor definition. For example:
function SomeConstructor() {}
SomeConstructor.prototype.someMethod = function() {}
var someItem = new SomeConstructor()
someItem.someMethod()
This is quite different to the way a traditional OOP language is constructed (at least in my less than 2 years of experience), for example in C#:
public class SomeClass{
public SomeClass() {}
protected void SomeMethod() {}
}
SomeClass someItem = new SomeClass();
someItem.SomeMethod();
Question: Do language paradigms such as OOP focus on improving efficiency of code execution, developer output (i.e. ease of use), or both?