Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
No, but I don't think that's a fair analogy. The fair analogy here is: should you consider learning how a food gets bad? Yes. Should eating it be (very) discouraged? Also yes.
So you'd consider eating bad and harmful food better than eating no food? ;-)
Unless you're dealing with legacy JS applications which also contain other horrors such as CoffeeScript, they really aren't the things that should be taught at all, or at least, they should be very discouraged.
Just unpublish it. Duplicates don't provide any benefit to CW.
Learning about the
pitch blackdark past of a language may not be a bad idea, but turning it into a kata definitely is. Asking people to implement something terrible because the language allows you implement something terrible is more harmful than anything.Oh damn, it is quite similar indeed. What's your recommendation of what I should proceed in this situation?
I agree with you! I don't believe at all this usage of Javascript is a good usage of the language. Having said that, I don't think just because an idea is bad that it's not worthing understanding and learning about it.
Given that, do you think this is a "completely lost" exercise or can we make it better? I'd love to hear and incorporate feedback on this kata.
Looks like a duplicate.
JSClass is as old as 2007, and just because it exists doesn't mean it's a good idea at all.
It tries to copy Ruby syntax, but ends up in a incomprehensible, poorly designed mess. Putting obvious early JS overriding nonsense aside (1 parameter call and 2 parameters call has very different meanings to the arguments on each position), Ruby doesn't use
new Class
at all, onlyClass.new
is used to instiantiate a class; JSClass uses.initialize
andnew
interchangably in schizophrenic ways. Like, why do wenew
the result as a function instead of.initialize
which is clearly the constructor? Why is this function then fed in like an object? Two different things are being fed into the function and it can easily break in some edge cases.this.super
is also superfluous: the only correct way of doing inheritance in JS is to use the prototypical chain (.prototype
and.constructor
), the language feature that has always existed.this.super
is an ugly hack that is completely unneccessary, prone to breaking (what if I have a method namedsuper
too?), not to mention just plain wrong.My point is, the whole idea this kata is based on is horrendous, and turning a horrible idea into a kata is one of the worst things ever. There are lots of people in the JS ecosystem who develop ways to use JS incorrectly and attempt to make JS behave like other languages because they have a terrible understanding of programming languages, and they should not be perpetuated.