Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681383yPlease don't.
That's just going to mess with every multilingual dev out there.
[] = array / list
{} = object
Simples. -
@C0D4 wait a sec, neither golang nor c/c++ init arrays with square brackets, if I'm not mistaken?
-
Tail calls
Operator overloading by whatever means possible (could also be a babel+typescript feature)
Runtime AST reflection to support expressions as first-class values (again, could probably be a babel feature)
A sensible API in place of the current (unsubscribing from events is done in the worst way possible) (could be a definitive package but it needs to be proper standard then) -
@lbfalvy Now we're talking seriously, allow skipping the "this." inside class methods.
-
respex1513y@C0D4 Which one is more consistent?
This
[] = array / list
{} = object
{} = code block
Or this
[] = array / list
[] = object
{} = code block -
C0D4681383y@respex don't come at me with consistency with a language that doesn't know the meaning of the word 😂
Tell me what this is.
let x = []
Is it an array? Is it an object?
You'll never know if both instantiations are the same. -
@respex
An object is usually just a wrapped code block - it has it's own scope… hence the {} makes sense. -
the change i want for JS is to be replaced with WASM. finally. completely. irrevokably.
-
@tosensei WASM does not replace JS, you just don't code using the language. The binary is the same as if you had written using the language (of course, with more safety and no useless casts, etc).
The binary is ready to execute, and that's a plus.
But the underlying engine still JS. -
@c3r38r170 you could use the keyword with. But I don't know why everyone screams that that's a bad practice.
-
@ChristoPy at the point where javascript is abstracted so far away you _don't_ have any contact with it, it _functionally_ doesn't exist anymore. and therefore, for all intents and purposes, has been replaced.
that being said: "the underlying engine [is] still JS"? you got any source for that? because it seems extremely counter-intuitive to me to design a _near native_, low-level bytecode-format, just to run it via a high-level, badly-designed interpreted language. -
@tosensei I'm talking about how the language *works* internally, on the VM side. Not the code itself.
I'm talking about the machine code generated after a JS file is downloaded, parsed and then compiled to machine code.
The WASM machine code is different from the machine code generated from a JS code. For performance purposes.
Even tough, different, the internal APIs are the same. Both byte codes work together.
And, for sources:
" the virtual machine that we talked about earlier will now load and run two types of code" from: https://developer.mozilla.org/en-US...
"Since JavaScript has complete control over how WebAssembly code is downloaded, compiled and run, JavaScript developers could even think of WebAssembly as just a JavaScript feature for efficiently generating high-performance functions." from: https://developer.mozilla.org/en-US... -
@ChristoPy so in short: the _language_ of javascript, which is the awful, headache-inducing, stockholm-syndrome-causing part of the whole setup, can be replaced.
-
@ChristoPy That's like saying that C and Haskell are basically the same language because the executed code is the same.
-
@ChristoPy They are both compiled so they both run on the same physical machine and utilize the same instruction set.
-
This is genius! Changing the semantics of existing brackets would be an absolute troll move! It would strengthen JS’s reputation as the #1 clown language for sure!
Greetings, fellow JS devs
What change do you want on the next breaking version of JS?
I would say use square bracket instead of curly bracket for object.
What do you think?
question