[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
JS took over the front-end web dev first... Then node.js cam
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 58
Thread images: 4
File: logo_JavaScript.png (10 KB, 1052x1052) Image search: [Google]
logo_JavaScript.png
10 KB, 1052x1052
JS took over the front-end web dev first...
Then node.js came and it dominated the server side stuff
then nativescript came and it dominated the mobile apps

Now it's coming for the desktop:

>http://www.wired.com/2016/05/javascript-conquered-web-now-taking-desktop/

Seriously, how can other programming languages even compete?

This bitch is unstoppable.
>>
>>54513092
JS is shit, C is a billion times better
>>
wired blocks adblock users

you shouldn't link to their content directly
http://archive.is/wFy2c
>>
>>54513140
>muh strict types
>>
I work fulltime as a JS dev/consultant and even I'm horrified at what has happened.

The measure of a language's popularity is how easy you can hack shit together. On that end JS is faster than other languages for the most part and it has more libraries now for every use case then almost any other language.

Most of my work involves coming into projects where the team said "Lets use NODE" and then proceeded to use it in its worse possible way.

12 nested callbacks in every route, mixing synchronous style code with async and wondering why its blocking, and just overall structure of the code is a mismatch of garbage. Its fucking horrifying and ill never be out of a job because more and more of it gets written everyday.

Node can be made to be effective if you treat it as a framework for creating/interacting with microservices.

It's when you use it like Rails where things get very hairy, and it requires actual dilligence, strictness and engineering to create something that wont be unsalveagable 3 months down the line.

Needless to say that never happens.
>>
>>54513226
>>54513092
I like how their entire comment section is rightfully shitting on javascript.

What a shit article, it doesn't even come close to being objective.
I now remember why I unsubscribed to wired years ago.
>>
Every day is a day I hate JS more
>>
>>54513257
You can write functions in C that don't abide by strong type, so all this muh strongly-typed bullshit is ridiculous when C is heavily used in libraries for other languages.
>>
>>54513226
10 sec of googling
http://reek.github.io/anti-adblock-killer/#filterlist
wired can suck my dick
>>
>>54513402
>2016
>thinking C is still relevant except for rare cases of low level operating system stuff
nice meme
>>
>>54513608
>le C is hard maymay
>b-b-but RAW POINTERS are bad!!
>sips $10 fellapuchino
>>
>>54513644
eat shit, freetard
>>
>>54513659
its called gnu/shit
>>
>>54513644
>writing le super optimized code in C using pointers

>now the program uses 99K of memory instead of 111K on an average computer in 2016 that has 8GB of ram

well done!
>>
>>54513682
why did you write shit twice
>>
>>54513718
nah it's more like
>unoptimized C code uses 16K of memory
>equivalent solution in node JS uses 5GB for the electron library and another 1GB for the actual logic.
>"UNUSED RAM IS WASTED RAM!" he posts as he takes another sip of his fair-trade doubleshot fellapuchino
>>
>"There are only two kinds of programming languages: those people always bitch about and those nobody uses."
>>
>>54513782
This
>>
Does JS take more time to learn than c++ now?
>>
>>54513806
Fuck no
>>
>>54513806
You gotta be kidding.
JS is much easier than C++

C++ is among the hardest of the popular ones
>>
JS is a clusterfuck: want inheritence? sure, we do it via prototyping, wtf. object literals, anonymous functions, nested functions, functions inside variables, variables as functions, FUCK THIS SHIT
>>
File: akari32.png (382 KB, 512x512) Image search: [Google]
akari32.png
382 KB, 512x512
I keep wanting to try out JS but I don't want to learn any bad habits because I come from C where static typing is mandatory.

Is there an actual way to learn JS proper and not JS + the author's favorite flavor of the month framework, because every single tutorial I've found seems to be written by a numale webdev cuck who can't write vanilla javascript at all.
>>
>>54513092
>JS took over the front-end web dev first...

That was the original goal. But then came the degeneracy

>Then node.js came and it dominated the server side stuff

That type of code is unmaintainable as soon as it exceeds a certain size.

>Seriously, how can other programming languages even compete?

Performance, ease of maintenance.
>>
>>54513851
It's not for autistic people who obsess over such things.
It's for people who get things done and know how to use the best parts of the language while avoiding the weird parts.
>>
>>54513851
Git gud, casul.
>>
>>54513862
This is the JS Bible:
http://shop.oreilly.com/product/9780596517748.do
>>
>>54513873
>weird parts.
All those are useful features.
I take it you have never used a functional or pure OO language?
>>
>>54513862
There are no bad habits. There's "it werks" and "it doesn't werk"
>>
>>54513766
>i'll pull big numbers out of my ass because I can
>>
>>54513888
I have used Python and Ruby
Pure functional never
>>
>>54513322
This.

Node and JS in general can be powerful. The problem it has is the same one PHP has, it's easy for retards to abuse.
>>
>>54513851
Those are all pretty good features senpai
>>
>>54513092

Native script has shitty UI and that's what sell mobiles apps the most, when that's solved you're probably right still native languages are better this is for lazy people.
>>
>>54513851
of all the things you could've pointed out that js is shit at, you choose the most trivial ones.
>>
>>54513922
Ruby has anonymous functions, functions as objects, nested functions and variables as functions
>>
>complaining about the good things in js
>>
>>54513955
yeah but still
>>
>>54513965
still what?
>>
>>54513092
oh yeah I totally love Chrome-based applications

>here's my 64MB calculator
>only needs 829MB RAM for simple addition
>>
>>54513955
>anonymous functions, functions as objects, nested functions and variables as functions
Why the fuck would someone call these "flaws"? I see them as amazing features.
>>
>>54513851
>he couldn't git gud
>>
File: javascript_the_goodparts.jpg (66 KB, 800x600) Image search: [Google]
javascript_the_goodparts.jpg
66 KB, 800x600
>>
>>54513863
>That type of code is unmaintainable as soon as it exceeds a certain size.
>he doesnt know about modules
>>
>>54513644
>always rebutting any dismissal of C with strawmen and other fallacies like putting words in people's mouths
I never understood why pointers are even a meme. They work literallly the same as variables in other languages except you can also do some math on them. If you just ignore the fact that you can count your address slots, they're no different from references to objects.

When I was taught C in college I literally was as confused about other people being confused about pointers as they were about pointers.
>>
>>54513862
Am I the only one who has worked a lot with js and has never ever had this typing problem? The people who complain about typing problems are the same ones that bitch about the unintuitive semantics of operators applied to combinations of strings and numbers, in other words people who knowingly pass objects around to functions without knowing what that object actually is, i.e. retarded people who can't into method signatures.

If your code ends up with weird bugs that turn out to be caused by passing weird arguments to functions (like string + number), it's your own stupid fault for not checking what you're actually passing to that function before doing so goddammit.
>>
>>54514729
I've worked on static typed languages for a decade and a half, and while I haven't used JS that much, I can agree there's nothing wrong with dynamic typing from my experiences with Python. Personally, it always only felt like sanity checking if I wasn't trying to fit everything into the right bytesized blocks, and that same sanity check is easily incorporated in dynamic languages through the same tests you would have written for the static languages
>>
>>54514814
exactly

The language allows you to work blindly with whatever input you get, that doesn't mean you have to actually do so and never type-check stuff.

People who write things like
Math.max(element.textContent, prompt("type something"))
and then whine about the weird result are retarded
>>
>>54513608
> embedded systems don't matter
Wooooo lad
"Code" exists outside your basement you know...

t.Motors
>>
>>54513851
> what is ecmascript 6
>>
File: collision01.webm (451 KB, 608x624) Image search: [Google]
collision01.webm
451 KB, 608x624
>>54513092
I like JS.
>>
>>54514933
C is ok for embedded but rust or some other safe alternative would be even better.
>>
>>54513851
>babbehs first contact with functional programming
>>
Node.js hasn't dominated anything. I haven't come across a single enterprise application that utilizes it. I've made web applications that run on node.js in the past, but it was more hassle than it was worth.

As for making desktop applications with it, node-webkit has been around for a long time. Nobody uses it, for good reason. When you include a browser rendering engine as a part of your application, you have to be hardcore about updates, since there will inevitably be an exploit in WebKit/Blink and that will make your application vulnerable.
>>
>>54514814
Typing isn't really an issue with JS anymore. Even with static typed languages you should have error handling for when shit doesn't happen as expected. Javascript is no exception to this. And when you need to coerce something to a specific type, you can cast it with parseInt, parseFloat, toString, or whatever. If you really need to ensure that something isn't going to get fucked up by string conversions, Javascript has typed arrays now (int8array, uint8array, float32array, etc)
>>
>>54514168

Doesn't matter if I know about them, Pajeet who did a good part of the backend doesn't and now that he left we need to maintain the code.
>>
>>54513851
>tfw transpiled es6 or TypeScript with full IDE support

It's not too bad really.
>>
>>54515463
>doesn't know a core part of the language
>previous dev didn't write clean code
>blames the language for not knowing how to maintain someone else's code
Thread replies: 58
Thread images: 4

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.