The dude inventing it should have just said to himself, "I am clearly out of my league here. I will provide first-class functions and allow people to roll their own object systems."
Not ideal, but enormously better than every web developer on the planet going through the contortions of that poor soul in the post.
The dude inventing it did so in great haste, and under the strange constraint that it needed to look like Java. It used its OO features heavily, so leaving them as an exercise for the user was not an option. The resulting Self-disguised-as-Java is an excellent general-purpose-language-as-DSL; it looks bad only because it became popular before its bugs could be fixed.
4 comments:
It would be less confusing if JavaScript followed Self's terminology instead of redefining "prototype" to mean "traits".
The dude inventing it should have just said to himself, "I am clearly out of my league here. I will provide first-class functions and allow people to roll their own object systems."
Not ideal, but enormously better than every web developer on the planet going through the contortions of that poor soul in the post.
The dude inventing it did so in great haste, and under the strange constraint that it needed to look like Java. It used its OO features heavily, so leaving them as an exercise for the user was not an option. The resulting Self-disguised-as-Java is an excellent general-purpose-language-as-DSL; it looks bad only because it became popular before its bugs could be fixed.
it not only looks bad, it is horribly designed. there is no good excuse. there just isn't. contemplate "this" for a moment.
Post a Comment