Live data from Hacker News

We Should Stop Using JavaScript According to Douglas Crockford (2023)

old.reddit.com

71–77 of 77 posts

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#71
post #28

I started with Javascript the same week it was released in Netscape. Before that I was using Lynx on an Amiga, and I often opined that this internet thing needed a scripting language. Javascript came along and it was amazing, it answered my prayers. As Javascript and browser tech evolved, I grew with it, doing amazing things long before anyone else was, like "AJAX", and "Dynamic HTML", etc. I'm still coding Javascrip…

I’m glad I found your comment at the bottom of this thread, because while I avoid JS like the plague, I love Typescript, and I can build what feels like anything for any platform faster than many people believe is possible when I quote them. I just need some more advanced features from C# / some runtime types… not a new language altogether. But even still, of all the languages I’ve tried, I prefer Typescript and its…

Typescript isn't Javascript, no matter how much propaganda you've read.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#72

Earlier quoted context omitted.

I think the issue with comments runs a bit deeper and is more pervasive than the (sad) fact that plain JSON does not support them. Case in point, I just tried and improved a frequently-used piece of 3rd-party software (written in Python) that I use as a CLI tool. Because I use it frequently I want to pass in parameters on the command line instead of editing a TOML file, so I got myself a TOML parser and wrote a teeny…

This project claims to do that: https://pypi.org/project/tomlkit/

kudos!

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#73

Earlier quoted context omitted.

The `new Go();` is doing all the JS that you claim to not be doing.

but all my logic that changes the DOM is in go. What am I missing?

your code is not manipulating dom. your code is interacting with a library that manipulates the dom. That library has to interface with javascript. You are still doing all dom manipulation via js, it's just hidden behind the library. If you inlined all functions from that library you'd get code that interacts with js.

tldr: no, you can't possibly be doing that. Because an api for it literally, objectively does not exist.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#74
post #69

Earlier quoted context omitted.

ok but I have all the advantages of go. I can code my go in a modern way and escape JS traps despite the end result is still using js.

Yeah I know. I don't care if it needs a bit of JS to bootstrap either. At some point it should get to a state where you can have a site with WASM and no JS required.

the problem is that because it's js, it's much slower than it can be.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#75

Earlier quoted context omitted.

but all my logic that changes the DOM is in go. What am I missing?

your code is not manipulating dom. your code is interacting with a library that manipulates the dom. That library has to interface with javascript. You are still doing all dom manipulation via js, it's just hidden behind the library. If you inlined all functions from that library you'd get code that interacts with js. tldr: no, you can't possibly be doing that. Because an api for it literally, objectively does not ex…

but you are missing the bigger picture no? We can, today, stop writing business logic in javascript/typescript for any frontend code. Yes it will call an api that runs via js. But step 1, stop writing any NEW javascript right?

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#76

Earlier quoted context omitted.

your code is not manipulating dom. your code is interacting with a library that manipulates the dom. That library has to interface with javascript. You are still doing all dom manipulation via js, it's just hidden behind the library. If you inlined all functions from that library you'd get code that interacts with js. tldr: no, you can't possibly be doing that. Because an api for it literally, objectively does not ex…

but you are missing the bigger picture no? We can, today, stop writing business logic in javascript/typescript for any frontend code. Yes it will call an api that runs via js. But step 1, stop writing any NEW javascript right?

the wasm-js bridge is quite slow. because wasm is a 2nd class citizen. It's not about which language you write, per se. You wrote those parts in go. Great! Those parts slower because of it, due to this.

Re: We Should Stop Using JavaScript According to Douglas Crockford (2023)

#77

Earlier quoted context omitted.

but you are missing the bigger picture no? We can, today, stop writing business logic in javascript/typescript for any frontend code. Yes it will call an api that runs via js. But step 1, stop writing any NEW javascript right?

the wasm-js bridge is quite slow. because wasm is a 2nd class citizen. It's not about which language you write, per se. You wrote those parts in go. Great! Those parts slower because of it, due to this.

oh but not noticeably to the user. Network latency is always what the user perceive as the slow part. Here's a complex site done this way: https://linkscopic.com/space does it feel slow?
Post reply on HN