Js is kill

Which programming language is going to compile to webasm and replace the awful plague of javascript

Attached: js-wat.png (225x139, 9K)

>that pic
js isn't a garbage treatment plant, if you put garbage in garbage is going to come out
the language has its problems but that's not one of them

>CTurds will defend this
#include

int main() {
char str[] = "abc";
str[3] = 'd';
printf("%s", str);
return 0;
}

Sure he beats me and puts out cigarettes on my belly button and and sells my stuff for drugs but he's really just a good guy. It's my fault cause I really made him do all that stuff to me. I caused it it's not his fault

First of all let me say that javascript is not completely kill but dying in popularity. It's just like how html and php are pretty much kill.

As for c# I think that language is the future for the web. C# already targets webasm and produces small fast code and is almost as fast as c++ when done correctly but way easier and less bullshit than c++. I think soon we will see the web coded in c#.

Attached: fN8pbGu.jpg (1024x1024, 110K)

Blazor is too young.
wasm to js is what jvm is to java
Just a lower level interface.

>HTML is pretty much kill
Do you even know how a website works? Even modern Front-End Frameworks like angular rely on HTML, this shit isnt going to go anywhere.

Same for JS. Webasm isnt going to replace JS in terms of front-end stuff.

> An object of arrays is different than an array of objects.

Seems reasonable, I dont see what your problem is.

You broke the underlying in memory string representation, what do you want to happen?

>HTML
>KILL
The fuck are you talking about man. HTML is nowhere near its death because if a webpage were a building, HTML its the fucking columns and beams.
Really, you must be a "tech reporter" due your ignorance level.
>As for c# I think that language is the future for the web
By this train of tought any language that can be compiled into WASM can acheve that, let it be JS, C#, python, go or any other overingeneered hipster flavor of the month.
You dont know what the fuck are you talking about.

> Faulty Analogy

golang, one day...

But programming in React using ES6 and either Flow + TypeScript is comfy.

Is this the power of CS undergrads who cant code 1 single line? do you need me to make a visual studio plugin that autocompletes it for your "app" ?

Scheme augmented with good modern engineering facilities like a packaging system and other such necessities, it'll be a back to the roots case since JavaScript itself is a scheme in Algol60 clothing. I'd be fine with any modern lisp, since every lisp can be easily turned into any other one.

Shit tons of shit still uses php its just not in vogue

Well, that's the entire point of programming languages, otherwise we would be programming in assembly and forgoing any kind of abstraction or error handling whatsoever. OP's example only shows what could happen in a complex program that happens to use arrays, maps and concatenates them, which is pretty damn likely. This "oh well you looked at it in the wrong way, i-it's your fault" stockholm's syndrome has to stop. You're basically saying there's no reason for bugs to exist because programmers who are not dumb don't make mistakes.

Pretty much anything can be compiled to wasm if you consider what has been done with Emscripten. Now, as for actual feasibility and not just empty theoretical statements, Mozilla is working on a Rust compiler for wasm.

what are you going to use besides php or node? i'm genuinely interested in what people could possible use besides these two things

php just has so much support for everything, i can't imagine using anything else

Uh, user... ever heard of Rails, Sinatra, Jekyll, Django, Flask, .NET, Struts or Tomcat? Even fucking pajeets have heard of at least two of these.

Take it a step further.
[] + + {}
"NaN"

>JavaScript itself is a scheme in Algol60 clothing
yeah and i'm a girl when i wear a skirt

Attached: helicopter.gif (380x380, 41K)

Dart seems like a popular alternative. Doesn't fin-like to webASM as far as I know, but they supposedly generate safe JS code.

React is literally anti comfy

If you don't know how a pc work it's not C fault.

asp .net

> You're basically saying there's no reason for bugs to exist because programmers who are not dumb don't make mistakes.

Yeah, this is usually the common argument used to defend C's fuckups, people blame it on bad programmers.

But hey, when it's about JS, which is typically hated here, it's always the language that is to blame.

He's retarded for saying html is kill, but in the current wasm race the first language with superb tooling and a nice framework will get a huge advantage as the first mover. The position C# and Blazor are in is looking pretty good right now.

i don't think you can even do that in C.
you initialized a char array with the string "abc"
the you tried to assign it a value after it had already been assigned.
you would have to do strcpy(str, "d");

>you initialized a char array with the string "abc"

are you retard?, how do you make an opinion about something you don't even have an idea about. An String in C is a null terminated char array.

>the you tried to assign it a value after it had already been assigned.

its not declared as const, so you can do whatever shit you want you lamer.

meh

Attached: 1.jpeg.jpg.png (302x35, 5K)

no we don't, only a retard would try to write a value out of bounds.

>strcpy(str, "d");
oh, and will str magically gonna group up, go back to javascript or python middle level languages aren't for you.

Now I understand why brainlets talk shit about C.

python

I'm not defending portable assembly here though, both let you do absolutely stupid shit. Still, JS attracts a lot of programmers with no knowledge of basic CS topics and that makes it even worse.

That's an inherent flaw of the current implementation of floating point arithmetic in processors though. Not programming languages' fault that base 2 is very shitty to represent decimal numbers.

>Still, JS attracts a lot of programmers with no knowledge of basic CS topics and that makes it even worse.

So what?, do you hire monkeys?, do you use shitty frameworks?, are you obligated to use shitty made web apps?. How can you say a programming language is bad because there is ignorant or stupid people?, there is everywhere, check for example this dude He doesn't know a shit about how memory managment works and he makes arguments out of his butthole, there are shitty coders everywhere and on every technology.

That isn't out-of-bounds; index 3 contains the null terminator, which is the last element of the array. Removing it means the printf function will print stuff from out-of-bounds, though.

Yeah when someone does something wrong in C it's because he's stupid, C is a great language that doesn't handhold stupid people because there are absolutely no faults to it.
When someone does something wrong in Javascript it's because Javascript is a shitty language lolamirite?
I bet you have never actually wrote anything of consequence in either.

How about you retards learn how addition and type conversion works in Javascript?
>doesn't understand the language
>blames the language when you fuck up

lol why the butthurt, just because you can't understand C?

i meant if you actually want to program

lol why the butthurt, just because you can't understand Javascript, a language so easy that new "koders" are born by the second?

The language isn't the only thing awful about javascript
The VM is as well
wasm is their brain damaged attempt to keep JS relevant a little longer
GraalVM is here
It can run all the javascripts
It can run python, ruby, perl, java, c
...
Are you seeing it now?
JS is kill
JS VM is kill
>but I have to download and install a program
the average web page now exceeds the size of the original Doom game
You are already doing that
>but I don't want to install Java
Java compiles to exe with jlink
The results are a fraction of the size of Electron apps
>Java sucks
Then use a different language
You can even implement your own and interop with other languages in GraalVM

You can already ditch javascript and use any language that compile to javascript:

Some languages with excellent JS transpilation support:

Scala
Clojure
Kotlin

You can also use a language made to transpile to javascript:

Purescript
Typescript
Elm

Elm is also the best programming language in the world. So you might as well use it.

ok. point me where I argued against JS ?, or whats your point

> just because you can't understand Javascript

you think you understand JS

whats the difference

var b = function (){}
var c = x => x ;
console.log(b);
console.log(c);
Result:
function
function

I guess you can't even tell

Anarrow function expressionhas a shorter syntax than afunction expressionand does not have its ownthis,arguments,super, ornew.target. These function expressions are best suited for non-method functions, and they cannot be used as constructors.
The first function doesn't even do anything.

googled /10

How would I know what to Google to copy and paste if I didn't know the difference?

How can anyone who has any idea types of values and a rudimentary knowledge of javascript syntax not get this? b and c are both fucking functions, so printing them without evaluating them will just spit out however js prints a function (i guess it prints "function" instead of whatever unique symbol they may have, if that's even a thing in js?). b is a function accepts no arguments, does nothing, and returns (presumably) whatever the js notion of void is, and c is a function that accepts one argument and returns it. Give me a fucking cookie.

t. an embedded C++ dev

>Yeah when someone does something wrong in C it's because he's stupid
Stop putting words in my mouth, I already said C is meant to be used as portable assembly and nothing else. That's pretty much abstracting over a bunch of hardware architectures and absolutely nothing else, there's no guarantee of safety or safeguards against bugs like the one posted in the OP. I was simply pointing out that JS is much more prone to this because of the lower barrier of entry. This is simply an observation, not an argument against JS.
However, compiling is mandatory on C, which at the very least filters out some very basic typing errors from the executable. This is not true for JS, and while excellent static analysis tools exist for both languages, you can get an executable ready to run without having to use those. In that sense, C provides a tiny bit more of error checking than JS.

Those are web programming frameworks for the backend, in case you didn't know.

And yet there are whole classes of errors that you have, such as the buffer overflow in the example (which even some people still didn't get judging by their responses), memory leaks, segfaults, that are possible in C but not in any high level language. And if those happen to you, it's not the language's fault, according to Jow Forums anyone not a retard can avoid them.

the ideal programming language is imperative (because statefulness is how processors work, is what most programmers start to learn, and lets the programmer have greater control over what's moved rather than copied for little reason which is very important for performance's sake) but statically, strongly, and powerfully typed (for the sake of producing correct software as easily as possible) and with mechanisms in place to ensure memory management is done simultaneously efficiently and safely

in other words, it's rust

rust is a dead meme, deal with it.

>It there are whole classes of errors that you have, such as the buffer overflow
I know, I literally said that in my post.
>>there's no guarantee of safety or safeguards against bugs like the one posted in the OP
Why are you trying to convince me C is crap? I already know that. That doesn't exempt JS from having its own share of design faults.

>are possible in C but not in any high level language

you clearly haven't write a shit , you can get memory leaks in high level languages if you are not aware of how reference counting works in some complex projects.

You clearly have no idea how anything works if you think reference counting is the only thing that is used to eliminate memory leaks.

Except that wasn't what was said at all? Cycles are real and if you aren't aware of them (and your allocation model/GC allows for them) then you can fuck up and leak shit. Do any of you shitheels even read? Why do I come to this board anymore.

I do not know you so maybe you are, but is it not the case? I mean js's function was thrown in in place of lambda in order to not scare the plebeians.

ayylmao now high level languages uses pony magic to arbitrary do avoid programmers being stupid and memory leaks doesn't exists in JS.

Attached: index.jpg (276x182, 6K)

>garbage collection is pony magic

it really isn't, there's no easy way of using call/cc or anything
i mean, technically you could make a lisp out of void*s but calling c "lisp in algol clothing" is a bit of a stretch

According to you this must leak a lot of memory because each call creates new objects with a cycle right?

function f() {
const a = {};
const b = {};
a.b = b;
b.a = a;
}

for (let i = 0; i < 10000000; i++) {
f();
}

I want microshills to leave

Yet another thread in which OP criticizes JS by mocking its type casting, a trivial syntax issue that almost never comes up in real work, rather than by making serious criticisms of the language - and thus reveals that he probably actually doesn't know much about the language.

>html pretty much kill
Wut

>type casting, a trivial syntax issue
how is an anal prolapse of a type system "a trivial syntax issue"?

Notice that OP doesn't criticize JS's type system (whether he should or shouldn't is another matter), what he does is post a meme image that criticizes JS's automatic type conversion - which is, like I said, a minor syntax issue that almost never comes up in actual work.

this wont happen because all the numales and koders only know javascript.

also javascript is on desktop and embedded now.

ffs, there is GC that is susceptible to cycles and you need to know whether the GC in your runtime cares or not. do you morons even read? ALSO I AM NOT THE SECOND ONE YOU QUOTED SO DON'T EVEN TRY THAT

JESUS FUCKING CHRIST DO YOU IDIOTS NOT UNDERSTAND QUALIFIED STATEMENTS? NOT ALL GC IS SUSCEPTIBLE TO CYCLES BUT SOME GC IS AND YOU NEED TO BE AWARE OF IT I AM FUCKING DYING OF FUCK HERE

Yeah or, you know, get a job.

$ cat > float.c

typescript is already replacing it