class A {
var aList = ['a', 'aa'];
get length => aList.length;
}
class B {
var aList = ['b', 'bb', 'bbb'];
get length => aList.length;
}
class C extends A {
var aList = ['c', 'cc', 'ccc', 'cccc'];
}
printIt(o) {
print("${o.aList}: ${o.length}");
}
void main() {
printIt(new A());
printIt(new B());
printIt(new C());
}
Result of running it: [a, aa]: 2
[b, bb, bbb]: 3
[c, cc, ccc, cccc]: 4 class InRuby
def aMethod
end
end
class InDart {
aMethod() {}
} class Dart extends JavaScript {
var points;
Dart(this.points = 10);
}
That's a sample Dart class with default constructor parameter.
Someone else posted a link to her GitHub repo and I was glad to check it out some. I chuckled at her using of Ruby/Rails. I was amazed at her using of jQuery.
It pains me to note that what the industry might consider sound software engineering is so detached from the creative tools that she has employed to get this going.
On one hand the industry demands greater quality from their tools. On the other hand the industry seems eager to provide the creative tools used by amateurs-alike to help to get people trained in the tools that the industry might need.
JavaScript really is a puzzle that the industry has been trying to solve. Because JavaScript is far away from what the industry might consider sound engineering principles. But users of JavaScript could make for great employees, so the industry has been trying to figure out a way to create a bridge between the two.
Keep up the great work! I liked playing the Hangman.
Cheers.