Why do people hate this language for all the wrong reasons?

Why do people hate this language for all the wrong reasons?

Functions as objects is cool as hell.

Other urls found in this thread:

githut.info/
en.wikipedia.org/wiki/ECMAScript#Versions
twitter.com/SFWRedditGifs

people hate javascript because they are forced into it.

they also hate it because the language seems easy at first but then they discover that its not and they get nervous.

I mean its alright, I can emphasize with them but what pisses me off are the smart asses that discard all the efforts of the community and be like "DAE hates JS frameworks xDDD" "DAE hates learning the tool chain muh fatigue :D:DD:D:". God I can't wait for webassembly so these fucks can stick to their C++ and not piss me off.

because it's pretty easy and let's you get away with things you wouldn't in other languages

Cred Forums Pass user since October 2016.

It's everywhere, the misfeatures are prominent, the shitlords run the ecosystem and most of the time everything is broken and awful.

A lot of the hate that belongs in the awful DOM is misplaced into the language, but the javascript writers design the DOM shit so it's all cyclical.

Is there another scripting type language that lets me pass functions around like javascript does? Python and Ruby have retarded mechanisms for it and actual functional languages aren't useful.
This is the only reason I like javascript.

Fails silently and is a nightmare to debug

the &block stuff is the only thing thing i really hate from ruby, rip function pointers

working as satan intended

People hate the DOM API (rightfully so, especially if you've been dealing with it for more than a decade). They just don't know it because they are mostly ignorant sheep.

Uh, even in C++ you can save lambdas into variables and functions as arguments are almost half a century old. In C# you can even define extension methods for functions(insane, but it works). Dunno why do you think JS is unique in that regard.

the DOM is an implementation there is the spec.
BUT this spec is different than the ecmascript spec and it includes handling of documents other than ecmascript documents

There are implementations that do not comply with the spec (probably all of them), and there are implementations that extend the spec ad-hoc (probably all of them).

The dom itself may be a criticism of the JS/ES ecosystem, but its not really a criticism of JS itself.

>Functions as objects is cool as hell.
And more specifically the fact that functions are treated as values. As they should be in all but the lowest-level languages, but that's not the case sadly.

Another baseless meme

I have yet to see a DOM implementation that is universally consistent with itself let alone the spec.

>lambdas in c half a century old
pretty sure thats not true.

I never said that.

probably true, all I was saying is that the DOM is not Javascript, it is a spec for a javascript implementation and javascript does not depend on it. You can use javascript without programming to the DOM

node is the obvious example.

Javascript is NOT programming

I got js script that read some info from a website. Can i run it somehow in a terminal without gui? If not what language could i use for that?

Well meme'd kid. Care to enlighten us what makes it not programming?

look into phantomjs, uses javascript to parse websites without opening the browser, just calling "phantomjs script.js" in terminal

btw you can use any language to do this kind of getting info from a website, generally

He's just baiting. Please ignore him.

>functions as arguments are almost half a century old
he's talking about function pointers

You can also just open a new tab, open web dev console and paste it there

its b8

With performing gets and posts? Java too?

I know, id like to run it in terminal though

>buttnuked webdevshits

javascript is not programming because, js is not used by programmers to make programs

use C instead

>With performing gets and posts? Java too?
I'm assuming, yes.

Look into phantomjs, it's just a small binary you download and you can use javascript in terminal, it console.logs to terminal too.

>js is not used by programmers to make programs
cute. back to your fizzbuzzes babby duck

...

Nice definition of programming faggot

I'm writing a simple OS actually.

Something you will never be able to do.

githut.info/

>Something you will never be able to do.
had to do it for my sr capstone.

literally, nobody cares. gg

Except you can run Linux kernel in JS, retard.

post code snippet or kys

>had to do it for my sr capstone.
sure you did

BWAHAHAHA

indurring cs100 homework

The thing Javascript is weird.

C++ is a simple and confusing language, and it's consistent at that.

Java is slow pile of shit, and it's consistent with that.

Python is python, and it's consistent with that.

JS is sometimes shit, sometimes kinda ok and sometimes LISP levels of awesomeness. It's like a bisexual hooker.

you realize python is slower than java rite?

like its not close...

Go > D > JS > Rust > C > C++ > Java

C++ is not a scripting language.

>Go
Ironic shitposting is still shitposting.

>Why do people hate this language for all the wrong reasons?
Perhaps you should post the right reasons to hate it. In your opinion, of course.

Because it's a fucking mess. Our professor once made us do some shit with Javascript and a no name JS library in class. Everyone's work was so shitty that our professor decided to restart the assignment and extend the submission date to 1 week (it was 3 days previously).

>I go to community college

All compiled besides JS. How the fuck they even compare?
What exactly you don't like about Go?
>inb4 made by Google
It is a fucking language you fag and it has an open source compiler. What does it even matter?

Because it's an awfuly designed (or rather: thrown together by Eich in literally 10 days so that Netscape could ship *some* scripting language before MS) combination of bad ideas, warts, quirks, inconsistencies and pure retardedness. It does have some pretty good ideas too, but they're not worth dealing with the warts.

JS is almost acceptable if used for the purpose it was created for, which is basic DOM manipulation (not that there's much alternative in this regard, sadly). However, web kiddies out there, for whom JS is first and only language they know, and who are too lazy to step out of their comfort zone and learn anything else, now force JS as a general-purpose and/or server-side language which it is not and was never meant to be.

every part of your post reads like an angry java dev's blog from 2008 and read as just as wrong and ill-informed.

Can you specify which part exactly you find "wrong and ill-informed" and why?

1) JS was designed in a hurry,
2) JS has a lot of bad design decisions and implementation quirks,
3) JS was not meant to be a general-purpose language and there's no reason to use it as one given the alternatives.

PROTIP: you can't.

> en.wikipedia.org/wiki/ECMAScript#Versions
plz go troll someplace that is less autistic

THIS. Fuck the DOM. It needs to be done from scratch and made exclusive for JS Harmony.
Hzrmony is already incompatible by design with old JS, so it makes sense to do it now.

The DOM is just major fucking bloat and rapes CPU when you try to update anything even remotely deep in the tree.
That shit is the whole reason Canvas was born. (W3C were not happy with this and wanted DOM-level integration, WHATWG told them to get fucked, basically)

Another reason dome hate it for us prototypes.
But ignore them, they are just inferior class-faggots.
Prototypes are mathematically superior and makd more sense.
The only bad thing is the JS way of making prototypes...

Fucking typos everywhere. Christ this headache.
Brb dyin squirtle

You seem extremely mentally handicapped. Is this how a typical JS dev is?

That just means you were all really fucking stupid

I dont like it, code looks unnatural to me.

You do realize that the current ES6 is a lot different from the original js shipped in the 90s. Sure it's not perfect but way better than what you are describing.

My main issue for most of my time with JS was it's difficulty to manage as the project got larger. Debugging was hard and refactoring was hard, but I have my hopes up for TypeScript. Thanks to Angular 2 at least it will be somewhat popular.

Typical js program.
});
});
});
});
});
});
});

time to spend a month refactoring everything to promises

async/await is here

hmmm, nested functions, remind you of anything?)))))))))))))

He doesn't, he's just assblasted neet from /dpt/ who is mad that there are people getting paid to write js while they are fizzbuzzing >for free in C. He keeps repeating the same memes about js he's read on some shitty blog from the 90s that criticized js.

>Functions as objects is cool as hell.
wow what a new and novel idea! go use Lisp for a week and then come back, maybe you'll realise how crippled and inadequate JS is

idk I think lambda or SK calculus is about as low level as you can get :^DD

copying the barebones wiki.osdev.org shit doesn't make you smart

ik you're joking but if you have that many nested parens then you've got some macro writing to do...

piss off passfag

>ik you're joking but if you have that many nested parens then you've got some macro writing to do...
try actually reading a Lisp book sometime, Lisp code is inherently a nested list structure with parens stacked at the end. I just randomly picked this code out of Paul Graham's 'On Lisp' book:
(defun before (x y lst &key (test #’eql))
(and lst
(let ((first (car lst)))
(cond ((funcall test y first) nil)
((funcall test x first) lst)
(t (before x y (cdr lst) :test test))))))

...

)))))) is acceptable. ))))))))))))))) usually isn't. benefit of lisp is that heavy use of functions and macros/metaprogramming allows you to abstract structure away so that your code is concise.

if you have really long tails of parentheses then your code is too deeply nested, and you should refactor it out. whether or not the shit in your MACROLET or LABELS block means the code is semantically identical to whatever came before the refactoring, at least you've eliminated the crazy nesting.

and trust me, i've spent way too long reading lisp books.

test

parentheses; elegant weapons for a more civilized age

>Can you specify which part exactly you find "wrong and ill-informed" and why?
>PROTIP: you can't.
watch me fag

>combination of bad ideas, warts, quirks, inconsistencies pure retardedness.
>It does have some pretty good ideas
already a contradiction

>but they're not worth dealing with the warts.
;use strict is a great example of how they are dealing with the warts within the spec

>JS is almost acceptable if used for the purpose it was created for, which is basic DOM manipulation

no, the dom is literally the worst way to use Javascript. the dom sucks. Javascript is the only way to work with the dom, but practically every post in this thread echos that the dom is literally the worst thing about javascript.

>However, web kiddies out there, for whom JS is first and only language they know, and who are too lazy to step out of their comfort zone and learn anything else
this is literally a 12 year old making an ad-hominem, in durring java rant blog

ripriprip

>now force JS as a general-purpose and/or server-side language which it is not
wrong.
turns out it is

> and was never meant to be.
until like 8 years ago. its the fastest scripting language by far, must be the fastest dynamic language, and apart from node, oracle nashorn is another great implementation / api to program to.

wrong and ill informed, the whole thing straight out of 2008. I

n fact I remember a whiny bitch on youtube that was crying about all the same shit in 2008-2009, the video would auto play after every nodejs talk on youtube. I'm trying my best to find it but I think you have been left so squarely behind, that every trace of everyone who shares your opinion has been washed away from the internet as totally irrelevant.

lua
very good programming language, but honestly even c has function pointers, which are good enough for everything that isn't fucking lambda calculus.
scheme is useful, guile is fantastic, and it's the posterchild for lambda calculus

>fizzbuzzing for free
FUCK YOU

lold

The only shitty things which come to my mind are:
* Lacking of a good standard library like in Python. That's why there's an npm package for every stupid thing.
* DOM in different browsers and general browser compatibility was really shitty and people had to deal with that.

>I can emphasize with them
you can what now?

this. JS is the only creative computer language.
reeee
js had been assembled by professionals for decades

You can use Scala as a scripting language.

>Why do they hate
Because they can't compete.

It's really just the oldie C guys who remember when programming was awful and libraries were in libraries as well as the Poojeets who are upset that JS is slowly but surely pushing mongoloid Java out of the backend world.

Because people hate weebdevs like me. Fortunately we don't care and a lot of us get to work in our comfy home instead of a curry-stench office. Suck to be you guys. :D

>that's_amore.png

>nightmare to debug
With modern browsers, that's objectively false.

The DOM of course is complete bullshit to debug.

>already a contradiction
No. lrn2logic.

>;use strict
Strict doesn't even begin to mitigate the core language's retardedness waiting to blow up in your face at runtime. From the top of my head:

>typeof null == 'object'
>typeof NaN == 'number'
>(NaN == NaN) === false
>Number.MAX_VALUE + 9e99 == Number.MAX_VALUE
>Number.MAX_VALUE + 9e9999 == Infinity
>values truncated to 32 bits on all bitwise operations
>whitespace sensitive because of semicolon insertion

Could you keep all the quirks in your head at all times and carefully work around them? You probably could.
Could you write a fuckton of unit tests to make reasonably sure you didn't forget about any? You probably could.
Should you, given the alternatives? Fuck no.
Would anyone not in deep denial call this a clean design? Fuck no.

>the dom is literally the worst way to use Javascript.
I didn't say it was good, I said it was the reason JS was conceived. lrn2read.

>this is literally a 12 year old
I'm not "literally" a 12 year old, lrn2english.

>making an ad-hominem
Making an observation about a group is not ad hominem. Calling someone "literally" a 12 year old is. lrn2latin.

>java rant blog
I don't code in Java, but the fact that you keep mentioning it all the time makes sense, given JS has Java complex in its very name.

>turns out it is
Turns out toothbrush is a paintbrush. All you have to do is spend ridiculous amount of effort to paint a house with one with shit results.

>nodejs talk on youtube
The fact that you seek technical knowledge on youtube and seem to think 2008 was so long ago tells me you're a millenial webdev faggot. Yes, that was ad hominem.

> ===
okay yeah the builtin maths are pretty fucked,
>semicolon optional no whitespace sensitivity anywhere

DOM is where most of the problems actually are.

>==
I already know that you know nothing about Javascript right there, and that you have nothing of value to say.

>>typeof null == 'object'
>>typeof NaN == 'number'
>>(NaN == NaN) === false
>>Number.MAX_VALUE + 9e99 == Number.MAX_VALUE
>>Number.MAX_VALUE + 9e9999 == Infinity
>>values truncated to 32 bits on all bitwise operations
>>whitespace sensitive because of semicolon insertion
none of these criticisms are legitimately bad, its an old language so it doesnt support utf-8 or 64bit floats

and youre just too dumb to know that == does casting,

Javascript types are very unintuitive though, sometimes a ObjectName is an Object, sometimes it's a Function (constructor) sometimes it's a TypeObject.

Typeof should really just go.

>>typeof null == 'object'
>>typeof NaN == 'number'
>>(NaN == NaN) === false
>>Number.MAX_VALUE + 9e99 == Number.MAX_VALUE
>>Number.MAX_VALUE + 9e9999 == Infinity

>Could you keep all the quirks in your head at all times and carefully work around them? You probably could.
>Could you write a fuckton of unit tests to make reasonably sure you didn't forget about any? You probably could.

the only thing you need to keep in your head is ===

you're literally a mental retard.

Where did the name come from anyway?

Since there is Java and JavaScript.

When I first heard of JavaScript I thought that's how to programmed for Java.

That was the idea, pretend it was somehow connected to something with money. Back in the 90s a patent lawsuit over something stupid wouldn't have been done.

Netscape made an arrangement with Sun to call it JavaScript but they had nothing to do with the development.

JavaScript mas meant to be "Java's dumb scripting brother"

es6 & typescript are what javascript had to be from the start

>JavaScript mas meant to be "Java's dumb scripting brother"

But then Java never got browser implementation and had to be delivered by shitty plugins, which are a dead-end solution now, because mobile phones don't reliably use plugins anymore.

Typescript isn't bad, but I don't see it taking off, even though it is baked into Angular 2.0 now. ES6 is the future.

I always thought that JavaScript is very, very close to a good and comfy language.

TypeScript proved to me that I was right. Just types and some of the modern ES6 stuff, that's all that was missing.