>>3
Actually, the original scripting language embedded in a (Netscape) browser was going to be Scheme (or Scheme-like). Then they decided to that the language should have a C-like syntax and prototype based OO. True story.
>>8
they decided they needed a "lisp" that lacks literally everything that makes lisp good; anything it doesn't lack is half-assed. also, the massive es6 circlejerk around features that most languages have had for years. i can't wait to see how those get fucked up! the same people who came up with ASI and the most absurd weak typing i have ever seen
instead of a language that had been around for decades and already had established implementations, they instead wrote a pile of shit in 10 days and now it is being hyped as the language of the future. people are getting excited over a rehashed idea just because it can do more than pop-ups now
people are getting excited over a rehashed idea just because it can do more than pop-ups now
People hate reforms and clean breaks. Dragging shit out and making it better by small increments is always has the upper hand over reforms in people's minds. Also, installed base, user base, etc. Javascript had a much bigger chance of being displaced if it weren't for jQuery (which is more than a small increment of better, I must say) and the like. In fact, if jQuery were spun off into its own browser scripting language, Javascript would be history. That's how shit evolves in tech, most of the time.
>>12
It was over the day the first popup ad was written. Browser makers simply could not drop support for this half-baked language as its use, even for menial things, was too widespread, and you can't just break the web overnight.
Now they have to face the hurdle of agreeing on a decent VM to ship alongside Javascript until it dies off in 10 years, when nobody will care about the crusty old pages which still use it. And you won't be able to use a decent language without ``compiling'' to JS for a couple of years after that.
Corporate users will still be stuck with IE 6, though.
Name:
Anonymous2012-09-21 19:17
>>12
Nope. The thing about JS that you guys don't understand is the prototype model with lambdas gives it the flexibility to be anything it needs. If jQuery came first as some sort of platform on its own (without those qualities), JS would still be as disruptive as otherwise.
People target JS partly because they think they can provide a better language (nothing wrong with DSLs and such), but all of those projects are only so successful because of the flexibility of the target. Don't like the semantics for something? Mess with its protos. Once you're happy with the semantics: emit code. That's all there is to it.
>>15
Also, most of what's bad about Javascript is actually not about the language at all. It's mostly about shitty or incomplete DOM implementations (not to mention DOM's inherent ugliness) and an incredibly bare-bones ``standard library''.
The short version of that story (as told by Eich himself istr) is: the standard library was implemented in 10 days.
Name:
Anonymous2012-09-21 19:49
>>16
scoping issues, this, lack of operator overloading, semicolon insertion, retarded coercion rules, module support not part of the core, etc. also, "portable". yes, with native you have to port to other platforms; with javascript you have to port to different browsers, each with their own subset of javascript and their own vm/jit with its own runtime characteristics and god knows what else. keycodes? have fun!
all that has fuck all to do with the DOM and is what people bitch about all the time. yes, some of those are proposed to be fixed in harmony... when is the release date on that again?
really, when a language needs a "good parts" book, there is something wrong with it
·Coercion is notoriously bad in dynamic languages.
·Semicolons aren't an issue (hell, people put up with what Go does, which will actually bite you in the ass in practice.)
·The incompatibilities are overstated (i.e. are a matter of standards conformance—you can't blame JSES for that, no matter what language is being implemented, it's just as likely to happen.)
·Operator Overloading Considered [spoiler]Queastionable At Best[spoiler]. Every language with operator overloading or templates needs a "good parts" book.
The scoping issue is bad, but at least there's lexical scope. Always use it. Namespacing is possible and not hard (or: it can be hard if you want it to be hard.) I've heard people complain about this but it never bothered me. Yes it's weird.
scoping issues this semicolon insertion retarded coercion rules
Those are pretty stupid, but encountered rarely enough to be a minor annoyance at worst.
lack of operator overloading
Operator overloading is not a good thing.
javascript was meant to be a forgiving and permissive language due to the fact that it is a browser language and so it was designed to try and make sense out of bad programming. this permissiveness also makes it somewhat quirky, which is ok considering what it is used for
>>26 fact that it is a browser language which is ok considering what it is used for
apparently not just the browser anymore!
Name:
Anonymous2012-09-24 5:44
While most of these cases make sense, the first one is to be considered another mis-design of the language because it never has any practical use.
Foo.method = function() {
function test() {
// this is set to the global object
}
test();
}
A common misconception is that this inside of test refers to Foo; while in fact, it does not.
In order to gain access to Foo from within test, it is necessary to create a local variable inside of method which refers to Foo.
Foo.method = function() {
var that = this;
function test() {
// Use that instead of this here
}
test();
}
Name:
Anonymous2012-09-24 5:56
>>28
Did you mean Foo.prototype.method ?
Also, that is hideously obvious. this always refers to the object the method was called on, i.e. that in that.test(). test() by itself uses the default (global) namespace.
also, var self = this is so common that Vim's default JS syntax highlights self as a keyword.
>>12
jQuery is shit bloat and ender's many modules are far superior
Alan Kay - JEW
Lev Vygotsky - JEW
Seymour Papert - JEW
Jean Piaget - JEW or HALF-JEW
Jerome Bruner - JEW
Noam Chomsky - JEW
John McCarthy - JEW
Karl Popper - JEW
Marvin Minsky - JEW
Terry Winograd - JEW
Gerald Sussman - JEW
Donald Knuth - JEW
Niklaus Wirth - JEW Brendan Eich (inventor of JavaScript) - JEW
Andrei Alexandrescu (inventor of D) - JEW
Guid van Rossum (inventor of Python) - HALF-JEW
Andi Gutmans and Zeev Suraski (inventors of PHP) - JEWS
Jean David Ichbiah (inventor of Ada) - JEW
Bertrand Meyer (inventor of Eiffel) - JEW
Name:
Anonymous2012-09-24 6:17
>>31
Alan Jay Perlis, Charles Katz (inventors of Algol) - JEWS
Name:
Anonymous2012-09-24 6:19
Alan Kay (caricatural Irish guy) is not a Jew. Donald Knuth (Viking name) is not a Jew.
Fuck you.
Name:
Anonymous2012-09-24 6:21
The arguments object is not an Array. While it has some of the semantics of an array - namely the length property - it does not inherit from Array.prototype and is in fact an Object.
>>37
You, Europeans, just have a different definition of a Jew...
In France, I’m Russian, and in Russia, I’m a Jew. In France, a Jew is someone who wears a yarmulke, goes to synagogue. If you don’t do these things, you are some other kind of person. But I’ll tell you: My social circle in France, the people I hang out with, is becoming more and more Jewish. There’s some kind of self-selection going on. You gravitate to your own. -- Pavel Lungin, Russian-Jewish filmmaker
>>41
You dont have to give Jews anything, they take it themselves.
Name:
Anonymous2012-09-24 6:41
>>44
Blacksmith. Typical non kike.
On his mother side: farmers.
Name:
Anonymous2012-09-24 6:42
Here is an article in Russian, where the Jews themselves admit they are biologically different and have much higher IQ than us, goyim: http://www.sem40.ru/rest/interesting/19053/
so there is nothing wrong with genociding the Jews, because they are different species.
Name:
Anonymous2012-09-24 6:44
>>46 On his mother side: farmers.
Probably mass produced alcohol, using goyim labor. Jews love alcohol, because it helps them to expand usury practice by selling it on credit.
Name:
Anonymous2012-09-24 6:52
>>47
You're a fucking mixed abortion of Caucasian Hazar Tatar Scyth Mongol and what not. And you're a muslim.
One caveat. You should never put the opening brace of a control structure (if, for, switch, or select) on the next line. If you do, a semicolon will be inserted before the brace, which could cause unwanted effects. Write them like this
>>50
JavaScript doesn't actually insert a semicolon in that case. it pretty much only happens if you put return on a line by itself, and just putting a space after return is enough to stop it from doing that.
>>55
It is hyped, look at the node.js faggot crowd who claims that making it possible to develop shitty ``apps'' in one language for both client and server was the holy grail and the point of the whole computer science thing and, consequently, since node.js was shat out javascript became the best thing ever to happen to computers. I'm not fucking kidding, they are saying exactly that.
var x = new Boolean(false);
if (x) {
alert('hi'); // Shows 'hi'.
}
Name:
Anonymous2012-11-02 4:34
As a web faggot programmer I write in both Python (the backend) and Javascript (frontend). And I have concluded that javascript is a fucking ugly mess of pieces of donkey shit. It had a chance to be a useful high-level language, and it blew it, completely and irreversibly.
Unlike Python which traded types (and, consequently, correctness and robustness) for being able to actually do shit and do it fast, and stuff some tricks into its sleeve along the way which would be impossible in statically typed languages, javascript did not get anything in return. It kept the shitty C syntax and explicitness, verbosity of Java, and C++'s trademark inability to accomplish anything within a reasonable time frame.
Its ``prototypal'' inheritance is a ridiculous concept with zero actual value. It needlessly confuses beginners and does not give anything to experienced programmers. Nobody uses prototypes, there are no place for them in shitty DOM manipulation ajax scripts. Or awesome scripts, for that matter, like that 1 kb game of chess. Nobody uses prototypal inheritance other than to (incompletely) emulate Simula-style inheritance.
Do you know why it was implemented? Because the creators of JS were too lazy and/or or incompetent to implement a real class system which had some benefits over existing ones, or at least was comparable and familiar. Instead they shat out an ugly fucking hack consisting of fucking chained hash maps and called it ``prototypal inheritance'' and started hyping it like it is the best thing ever to hide the fact that it barely fucking works.
Javashit is the biggest PL disappointment in my career, I was expecting a magic wand and instead got an undergrad's toy, and I pity the fools who use it to write backends. Python is a much saner choice, or Perl, or even fucking Ruby. And yes, v8 is better than what Mozilla and IE had before it came along, but it compares poorly to real JIT runtimes like CPython, PyPy, Perl, JVM etc.
Name:
Anonymous2012-11-02 4:50
>>23 The incompatibilities are overstated (i.e. are a matter of standards conformance—you can't blame JSES for that, no matter what language is being implemented, it's just as likely to happen.)
You don't support IE7 I take it? Because I do, and about 25% of my JS programming time is devoted to make the frontend part work in IE fucking 7. It can break in surprising ways and there are no useful debuggers for IE.
·Coercion is notoriously bad in dynamic languages.
Python coercion is not so fucking retarded. It was designed, unlike javashit which was obviously stuffed with stubs and wired together without much thought until it stopped crashing. There are virtually no useful coercion rules. How about this: js> [3] * 10
30
js> [1, 2, 3] * 10
NaN
js> [1, 2, 3] + [4, 5, 6]
"1,2,34,5,6"
Really, what the fuck? What other language is this confused about what to do with its values? Python gives intuitive, expected, and useful results for all three operations, and you enjoy your "[object Object][object Object][object Object][object Object]". Fuck you and fuck javashit.
FUCK YOU. DOWNLOAD XXX BROWSER TODAY, WITH THE NEW SCHEME PLUGIN
1) Make it better, "You can not watch this site if you do not have the scheme plugin installed."
2)Look it my double. It comes with jimmies too.
3)It gives a browser experience like never before seen on your retina display.
4)I hurd u laik waffles. Hear iss a pankike sted.
>>62
not even FFOC fucks up that badly. it really only has two "unexpected" coercion cases: number -> string and string -> number, which only happen in the context of its separate concatenation and addition operators so there's no question as to what "1" + 2 or 1 .. 2 means. although, the BDFLs are considering removing these coercions anyway
>= {3} * 10 -- error: attempt to perform arithmetic on a table value
>= {1, 2, 3} * 10 -- ditto
>= {1, 2, 3} + {4, 5, 6} -- ditto
FFOC isn't even considered an OO language and yet it still has a mechanism to handle its self value.
x:dosomething(1, 2, 3) -- translates to:
x.dosomething(x, 1, 2, 3) -- with `x' being evaluated only once.
needless to say, FFOCfags are not impressed by javashit in the least. it's only now getting shit like block scoping and correct handling of lexical scope.
i mean hell, they chose generators over full coroutines! they even used keywords! meanwhile i can go and cripple them on a per-function basis, since i can just write different wrappers over the coroutine library and insert them into function environments as needed.
javascript is the best language I have ever worked with for the sole reason that it doesn't have classes. It forces you to do functional programming because if you don't your code will be a mess.
yes I know they are adding classes in ec6, but they are the most minimal kind of classes, essentially just sugar on prototypes.
>>72 javascript is the best language I have ever worked with for the sole reason that it doesn't have classes.
I'm dumbstruck by the sheer amount of Reddit in this post.
It's so retarded I... uh. It won't be easy to recover from this brain damage I just got by reading that post.
>>76 Reddittards think that it is functional programming if you program with functions only
I laughed pretty fucking hard.
>>78
I'm seriously starting to doubt it. The Javascript troll has been here for the last few months, but he doesn't seem to be a troll anymore. Looks like he's completely serious about that.
>>79
It's always like that: first someone makes a joke, then that joke becomes a meme, and finally new people don't realise it was ever a joke.
The curse of anonymous BBSes.