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?
use something else then, hating on js is low hanging fruit
Owen Fisher
>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.
Nathaniel Baker
Use typescript. I get it though
Jeremiah Martin
javascript is inhuman abomination language.
Adam King
>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. नई दिल्ली?
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
Logan Parker
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.
Easton Gray
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.
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.
Austin Robinson
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
Nicholas Thompson
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.
Elijah Sanders
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
Kayden Rodriguez
He clearly doesn't: >Once javascript gets native objects
Jason Moore
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".
Isaac Watson
Watch out guys, we have a guy who writes C in vim on his Thinkpad running Gentoo here.
Ryan Baker
wahh, other languages aren't like languages I know (although it doesn't sound like you know them at all)
this
Joseph Moore
I bet he even has an anime wallpaper and programing socks too.
I mostly write C++ so you could say I understand the benefits of OOP considering I use the language that started the phenomenon.
Nicholas Gomez
>using JS when there is TypeScript
C# > Java TS > JS microsoft blessed this world once again
Jace Butler
>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
Tyler Ward
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.
Luis Parker
>var thing = {}; there's your object, fag
Jaxon Adams
That's an empty dictionary/hash map.
Brayden Wilson
I don't know either So I should start with c# before js?
Jaxson Nguyen
If it's not a number, string, boolean, null, or undefined value, it's an object. Greetings from javascript land!
Julian Foster
Only Haskell and lisp are Jow Forums approved
Kayden Williams
this. easy solution to a non existent problem. get over your ass
Jason Williams
when do you use rej? are re and rej callbacks
Lincoln Morales
>2018 not using typescript
David Wood
>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.
Carson Evans
>ES6 introduces default arguments. God this concept looks so fucking wrong.
>like solving a puzzle, the rules of which you don't even know puzzle rules?
Nolan Price
>tfw JavaScript is actually a cluster fuck
Legit, I'm in the same boat as OP.
How do you even debug JavaScript?
Anthony Howard
Every browser comes with a debugger for front-end.
Node has a debugger for back-end.
Matthew Evans
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.