I can't stand javascript

I come from the wonderland of Java and C# and I can't take javascript anymore.

How am I supposed to live without static type checking? I just get a freaking 'var'? Really? In what world does that beat the tightly controlled ints and chars and booleans?

How do I not include a 'callback' in every damn async method? More than half my code is error handling and callback bloat. This is just depressing.

I'm supposed to 'remember' all the function arguments? json object fields? Javascript lets you dig yourself into a hole really easily. It's so easy to make mistakes.

There's no classes, there's no 'objects' there's no 'scope limtations' but apparently there is a hack to accomplish everything. I thought I relied on stack overflow quite a bit when using Java or C#. With JS, it's like solving a puzzle, the rules of which you don't even know. I will literally be unable to do anything without stack overflow.

I can just skip an argument if I don't feel like it? Am I supposed to have null checks everywhere to see what the hell the function caller is trying to do with my poor function?

I don't know if I can do this anymore.

Attached: images.jpg (225x224, 5K)

use something else then, hating on js is low hanging fruit

>why isn't every language the same as the only one I know?!?!
Fuck off retard. Half of your complaints are not even a problem once you do things the JS way instead of the Java/C# way.

Use typescript. I get it though

javascript is inhuman abomination language.

>I come from the wonderland of Java
>There's no classes, there's no 'objects'
>I thought I relied on stack overflow quite a bit when using Java or C#. I will literally be unable to do anything without stack overflow.
नई दिल्ली?

This.
Kill yourself, OP

Attached: lmao2.gif (450x337, 1.73M)

For async stuff I usually just do something like this. Its annoying but you get used to it eventually, JS is like that
function aFunc () {
return new Promise(function (re, rej) {
someAsyncFunc(function (data) {
return re(data)
})
})
}

JavaScript tis a silly place

Javascript is fine for small things and for large apps you should be using typescript or another compile-to-js/webassembly. Nobody writes new large web-apps in plain JS.

OOP is the most widely used paradigm for a reason. Large scale projects are nearly impossible without good OOP under the hood. Exceptions exist so I'm not interested in your cherry picked examples.

Once javascript gets native objects instead of hacks and workarounds, it can become more than a mess of a language for enterprise users.

You have no idea about what you're talking about.

Who is this cutie

t. pajeet rashnush

javascript is OO, it just isn't java

Attached: spaghett.png (339x319, 117K)

I'm on the same both as you, OP. Like the others said, try using typescript or something. You are right, JavaScript is like opening yourself to so much problems that could have been solved easily with strong typing.

He does though. Oop is great if you have tons of people working for you and everything is modular so you only have to edit a piece of code instead of a bohemith turd

I'm a software engineer with experience in Jow Forums-approved languages like C and C++. I am certain I know more than you about programming. If you know C, you can easily learn arguably the easiest scripting language that basedboys like you learned in a weekend boot camp. Try that with C and you'll be fucking crying due to the brutality and complexity after a few hours. Do you know that C doesn't even have native strings? That type of hardcore low-level shit is unheard of in javascript so don't tell me that I have no idea.

Fucking currynugger
Transpyling, es6, linting, typescript. Theres a lot of more stuff to help you out. But none of them will for you cause youre fucking horrible already

He clearly doesn't:
>Once javascript gets native objects

Makes sense you spend most of your time with C, since you haven't understood the elegance of prototypical OO. Plenty of shitty things about the language and platform before wanting "native objects".

Watch out guys, we have a guy who writes C in vim on his Thinkpad running Gentoo here.

wahh, other languages aren't like languages I know (although it doesn't sound like you know them at all)

this

I bet he even has an anime wallpaper and programing socks too.

Attached: tk.gif (340x340, 137K)

I mostly write C++ so you could say I understand the benefits of OOP considering I use the language that started the phenomenon.

>using JS when there is TypeScript

C# > Java
TS > JS
microsoft blessed this world once again

>Try that with C and you'll be fucking crying due to the brutality and complexity after a few hours. Do you know that C doesn't even have native strings? That type of hardcore low-level shit is unheard of in javascript so don't tell me that I have no idea.
cringe

Why the fuck do you rely on JavaScript so much to cause any kind of problems, JS should only be used to fetch and display data on the browser, anything else should be done server side unless you're a using a MEAN stack in which case you're retarded.

>var thing = {};
there's your object, fag

That's an empty dictionary/hash map.

I don't know either
So I should start with c# before js?

If it's not a number, string, boolean, null, or undefined value, it's an object.
Greetings from javascript land!

Only Haskell and lisp are Jow Forums approved

this. easy solution to a non existent problem. get over your ass

when do you use rej? are re and rej callbacks

>2018 not using typescript

>How am I supposed to live without static type checking? I just get a freaking 'var'? Really? In what world does that beat the tightly controlled ints and chars and booleans?
By designing a sane architecture. You can use TypeScript if you need types for static checks badly. Truth is, in most cases you really don't need them as long as your code is designed well.

>How do I not include a 'callback' in every damn async method? More than half my code is error handling and callback bloat. This is just depressing.
You can use promises in ES6. You can also not have anonymous and stacked callbacks, which leads to much greater code clarity. Name your functions, and then refer to them when using callbacks.

>I'm supposed to 'remember' all the function arguments? json object fields? Javascript lets you dig yourself into a hole really easily. It's so easy to make mistakes.
Again, sane architecture. Use JSDoc style comments for a more formal code. Use docs. Use docs. Did I mention use docs? There's a reason JS libraries usually have beautiful, in-depth docs.

>There's no classes, there's no 'objects' there's no 'scope limtations' but apparently there is a hack to accomplish everything. I thought I relied on stack overflow quite a bit when using Java or C#. With JS, it's like solving a puzzle, the rules of which you don't even know. I will literally be unable to do anything without stack overflow.
ES6 introduces the concept of a class, but I would advise avoiding it anyway. Prototypes are different but equally powerful. Oh and don't rely on Stack Overflow, many of the answers there, even high rated ones, are simply wrong or taken out of context. Read a good book on JS and get familiar with the language in-depth. I recommend YDKJS (github)

>I can just skip an argument if I don't feel like it? Am I supposed to have null checks everywhere to see what the hell the function caller is trying to do with my poor function?
ES6 introduces default arguments. Exit the Java mindset.

>ES6 introduces default arguments.
God this concept looks so fucking wrong.

Attached: 1525128674156s.jpg (125x118, 2K)

please tell me she doesn't have a penis

Shes does not have a penis

>write 1 line in Kotlin
>can't stand Java anymore

MAKE{ IT }.STOP

Attached: 1440520632383.png (270x270, 156K)

>like solving a puzzle, the rules of which you don't even know
puzzle rules?

>tfw JavaScript is actually a cluster fuck

Legit, I'm in the same boat as OP.

How do you even debug JavaScript?

Every browser comes with a debugger for front-end.

Node has a debugger for back-end.

I feel the same, but with python. I can live with it, but I fucking hate have to debug shit in runtime that a language with hard typing would have not let compile especially when its retarded errors.

you just gotta transpile to it homie

re is short for resolve, rej is short for reject.