Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    just because an idea is bad that it's not worthing understanding and learning about it.

    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.

  • Custom User Avatar

    What's your recommendation of what I should proceed in this situation

    Just unpublish it. Duplicates don't provide any benefit to CW.

    Having said that, I don't think just because an idea is bad that it's not worthing understanding and learning about it.

    Learning about the pitch black dark 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.

  • Custom User Avatar

    Oh damn, it is quite similar indeed. What's your recommendation of what I should proceed in this situation?

  • Custom User Avatar

    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.

  • Custom User Avatar
  • Custom User Avatar

    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, only Class.new is used to instiantiate a class; JSClass uses .initialize and new interchangably in schizophrenic ways. Like, why do we new 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 named super 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.