[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
Whats wrong with JavaScript /g/?
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: 36
Thread images: 4
File: image.png (27 KB, 587x330) Image search: [Google]
image.png
27 KB, 587x330
Whats wrong with JavaScript /g/?
>>
>>54647980
You
>>
>>54647980
it's gay.

it fails silently.

it's dynamically typed.

basically a shitstorm
>>
>>54647980
It let's you do what you want.

People can't be trusted with power.
>>
>>54647986
correction
it's gay. that's obvious, but should always be stated.

it fails silently, yes.

it's _un_typed, even worse than dynamically typed.

it's interpreted.

basically a cuckhold's wet dream.
>>
It's a pile of shit because it is the standard scripting language for the web. Too much demand for different use cases. Also contains a fuckton of weird workarounds for simple things and it's horrible for large-scale projects.
>>
>>54647980
Nothing, except that it tickles the autism of C developers for reasons beyond understanding.
>>
File: out.png (242 KB, 512x288) Image search: [Google]
out.png
242 KB, 512x288
>>54647988
It lets you think it'll do what you want, but is more ambiguous than PHP.

People can't be clear enough in it to be useful for long.
>>
>>54648104
same reason i hate python

that's that shit i don't like
>>
>>54648138
when is /g/ going to make their own version of this?
https://www.youtube.com/watch?v=Omlx8kdQF9g

>tripfags is what I don't like
>>
>>54648138
Strangely I like python, especially python3.

Mostly because even when you think it's being ambiguous it isn't, but that might just be stockholm syndrome at this point.
>>
>>54648315
>even when you think it's ambiguous it isn't

WHAT
H
A
T
>>
>>54648332
bool("False") == True
>>
Compared to languages like Ruby or C#, it looks like absolute dog shit and operates like dog shit
>>
its the future and nothing is wrong with it
>>
>>54648394
Those are both meme languages too
>>
It's forced on everyone for everything
>>
>>54648430
What languages are acceptable?
>>
There is only function scope and file scope, variables inside loops and objects are global, you have to do stupid tricks like declare objects inside functions to hide the variables. having to explicit declare variables as local to functions is stupid and tedius. ECMAscript 6 is supposed to 'fix' this by introducing let variables...OH BOY, lets pretend Javascript is Scheme and wrap everything in let blocks
>>
>>54647986
>it's dynamically typed.
>>54647999
>it's interpreted.

>waaah, its dynamically typed and interpreted and not compiled like muh C waaah
fizzbuzzers please go back to your /dpt/ and masterbate over C, youre opinions mean nothing here
>>
>>54647980
What is good about JS:

- dynamic typing allows for fast development times
- it allows you to have fast feedback from what you write to what you see
- core JS has common C-like syntax, so if you learned any other common programming language lots of things will look familiar - so it's a language you can start with relatively fast, though that doesn't mean you'll become proficient fast in it
- functions are first class citizens
- it's flexible
- everything can be turned into an object
- it's sandboxed, there's not much harm you can do with it, which makes it a safe language
- it triggers C fags and old farts

What is wrong with JS:
- built-in methods and objects can have quite long names, but that makes their purpose easily understandable
- it's single-threaded, so it doesn't use CPU power optimally
- it's synchronous, which makes debugging difficult
- dynamic typing and automatic garbage collection makes it slow in some tasks
- it doesn't trigger C fags and old farts enough
>>
>>54648592
There's a degree of acceptance to all of them. C# is just made for developer lock in, the language might be convenient but in the end you're stuck-ish in their eco system and their horrible values and technology.

Ruby solely based around *beautiful looking syntax*. Instant red flag. Don't use.
>>
>>54648669
my computer programming course next semester uses C#.

i use a macbook pro, and am definitely not installing windows.

is mono good enough, or should i just migrate to a decent uni?
>>
>>54648774
they used to use C++, but recently switched for reasons unbeknownst
>>
>>54648774
That's a mess. What insane university would adopt Microsoft eco system?
>>
File: CMPsmIQ.webm (642 KB, 426x314) Image search: [Google]
CMPsmIQ.webm
642 KB, 426x314
>>54647980
>Sometimes when I'm writing Javascript I want to throw up my hands and say "this is bullshit!" but I can never remember what "this" refers to

http://javascriptissexy.com/understand-javascripts-this-with-clarity-and-master-it/

>40 minutes to understand what "this" means.
>>
>>54649166
Use typescript or some transpiler that supports lambdas, which always enforce lexical scope with "this" (I.e. instance methods in a class that use "this" will always be referring to the current instance of the class). Use lambda syntax for every function definition.

If you're using "this" for anything else, you fucked up
>>
>>54649221
Also always, always, always use strict mode, so "this" never gets set to global/window unintentionally
>>
>>54649166
Fucking

https://github.com/facebook/react/issues/4065
>>
Retarded nu males think everything should be written in it.
>>
>>54648774
>is mono good enough

As long as you're fine with occasionally finding perfectly good code that works in class needs to be written slightly differently by you it's fine.
>>
There is no such concept as integers or floats, just a "number" (which is a 64-bit floating point), and thus variables you want to be treated as integers have an odd 53 bits of precision. With high enough "integers", your values will start to round up or down completely silently because the mantissa will be too short to be accurate. Smart

Also, seeing this everywhere since there is no distinction between functions and objects so every callable is a closure:

var self = this;
>>
I work as a fulltime javascript consultant. Here's whats wrong with it.

Fails silently. Makes bugs much harder to track down.
Untyped so harder to refactor/catch errors before running the code
Incredibly flexible, meaning every codebase has a different style of programming, many of them bad.
callback style handling of async tasks. Yes there are promises and yes there are generators now, but most people dont use them, or dont understand them when they use them.
So many weird workarounds for things makes the language inconsistent and verbose is many cases

It takes a lot of effort to scale javascript. My work mostly involves coming onto legacy projects where the people had no fucking clue what they were doing, used callbacks for everything, jquery spaghetti, and == != for everything.

I wanna get out, but javascript keeps rising in popularity. So I feel I'll always be a JS consultant fixing utter shit for a living.

At least I'll never run out of work.
>>
File: 1418350305187.jpg (8 KB, 217x250) Image search: [Google]
1418350305187.jpg
8 KB, 217x250
>mfw Web Assembly kills JavaScript
>>
>>54650637

It cant come fast enough.
>>
>>54648665

The best and only useful post in this thread so far.
Thread replies: 36
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.