Live data from Hacker News

JavaScript is Good, Actually

ashfurrow.com

211–220 of 369 posts

Re: JavaScript is Good, Actually

#211
post #94

Earlier quoted context omitted.

If we’re talking about “dynamic CRUD over socket abstracted to death”-style tasks, and not considering minor preferences like syntax, then python, lua, most of lisp/schemes, perl. All of these allow enough meta-anything to do: ./file.src: func api_foo() for x in objs x.a = fetch(x.b) ui.btnok.enabled = yes commit() And have foo exported as api, and when called, all clients/servers, databases synced, validations passe…

Nothing is stopping you from generating JavaScript code to do what you want. You don't need reflection to do that. I'd hate to see Python become as popular as JavaScript and to have it be used as the defacto standard in browsers because honestly, it's nowhere near as enjoyable to use as JS.

No, Python is much more enjoyable than JS (see what happens when you turn subjective statements into objective ones?).

It feels to me like JS is more for people who want to write "clever" code and Python is for people who want to write boring, more maintainable code. It doesn't help that JS has a gentler learning curve and attracts more people who just want to get things done without thinking whether those things should be done that way.

Re: JavaScript is Good, Actually

#212

Switching back to Java after having spent a long time in JavaScript land with modern standards made me realize how great JavaScript had become. The biggest reason for JavaScripts greatness to me is JSON. I couldn't understand how Java developers put up with such bulky ways to deal with data. After some time in Java land I've come back to appreciating its strengths again though. Code completion is nice. I'm kind of ho…

You should try Kotlin. It solves exactly this pain point - creating classes for data structures is very terse and easy. You can have a one-liner class like class Person(val name: String, val email: String, val yearOfBirth: Int? = null) Or you can make it a `data class` and get automatic `equals` and other things.

Thank you for telling me. I've been hovering around this possibility since I'm using Intellij and am the primary owner of the code. Although I'm also keen on this code being as accessible as possible for the rest of the organisation and few has even heard of Kotlin.

When I suggest switching to Kotlin everyone's always smiling dismissively like "ah, you with your crazy ideas again".

Might do it though. Maybe.

Re: JavaScript is Good, Actually

#213
What's old is new again. Electron feels very much like the old gui systems like ToolBook, VB6, and other 'RAD' tools. It's not so much about the language as all the 'batteries included' toys that come with it.

Re: JavaScript is Good, Actually

#214
post #93
post #35

This is a lot of lines for not saying much. I was expecting much more from a "world-class software developer"(see About section) :) Saying that the community is more advanced in the JavaScript ecosystem than it is in the iOS world is a nonsense to me. Don't we have more JS developers than iOS developers ? Moreover, saying that JS syntax is really good with tools like TypeScript is another nonsense. You can also write…

That's interesting because I also picked up on that: "I am a world-class software developer living in New York’s East Village" and I just thought, hmm, here's this guy with ~5 years of ~professional dev(mainly with iOS) and he self qualifies himself as world class. Looking at his bio, I see he's worked for 3 companies doing quite ordinary things. I would love to know what gave him the confidence/ignorance to describe…

That 5 years blog post is from 4 years ago.

Ash is a pretty well known developer in the iOS world. He contributes to a lot of well used open source projects and what Artsy is doing (open source by default) isn't something I would describe as "quite ordinary" even if what they're working on is.

I don't know if those credentials are enough to be described as world class, but I would bet it's a bit tongue in cheek anyway.

Re: JavaScript is Good, Actually

#215
post #115
post #104

Earlier quoted context omitted.

That is true, but there are a lot of risks associated with transpiling completely different languages that are not there when using TypeScript. For example, if TypeScript ever goes away, you simply transpile it to Javascript once (i.e. strip away the explicit type annotations) and continue to work on the resulting Javascript - in a different language, that would be a complete mess. Furthermore, TypeScript integrates…

I totally agree with you. My point here was just to prove that you cannot sell the beauty of JavaScript syntax by saying that you have to use TypeScript :)

Haha, that's true, though I guess in the context of this article that's mostly semantics, since it says that tooling (like TypeScript) is part of what makes "Javascript" great :)

Re: JavaScript is Good, Actually

#216
post #15

Earlier quoted context omitted.

> Switching back to Java (...) I miss the "and a project which doesn't use modern standards"-part in your post. It's not as if JSON or other modern things are not used in many Java projects. Your project seems to be stuck in the past, as are many JS projects. Legacy code is no fun most of the time.

I didn't read this as a json vs xml comment, although I suppose it could have been. Rather, I think it's a comment about how there is no convenient, lightweight syntax in Java for dealing with records/maps/trees/dictionaries.

Yes this was closer to my point. Dealing with JSON (like data) is much less convenient in Java than JavaScript. Haven't had to deal with XML configuration in Java for a long time, which I'm thankful for.

Re: JavaScript is Good, Actually

#217
post #124

Earlier quoted context omitted.

The difference between the hostility to php and the hostility to js is that there are many alternatives to php whereas, right now, if you want code to execute in the browser or on many different platforms, you don't have a choice. So where I would normally tell people who boo php to use whatever language they prefer, and get over it, that's not possible with js.

> So where I would normally tell people who boo php to use whatever language they prefer, and get over it, that's not possible with js. Maybe 5 years ago. For nowadays, I beg to differ: https://github.com/jashkenas/coffeescript/wiki/list-of-langu... A significant amount of the choices there produce generally better-performing code than the hand-written JS, there's also the WebAssembly.

While technically true, don't you still have to debug and diagnose issues from the generated JavaScript? I'd love to write front-end code in anything else, but if I have to know exactly how it gets converted to JavaScript it kind of defeats the point.

Re: JavaScript is Good, Actually

#218
post #123
post #39

Semantics and configurability is what what makes a language great. JS doesn’t have function environments, i.e. every unlexical lookup goes to global/window and that cannot be redirected. It doesn’t have green threads (at least). There are generators, but one cannot just yield without marking all the functions generators too (async/await in modern terms). Stack traces are lost when generators throw(). JS has no good i…

Imo, all people saying that some language or tech is good enough seriously lack imagination. Things could be so much better.

Any examples?

Re: JavaScript is Good, Actually

#219
post #213

What's old is new again. Electron feels very much like the old gui systems like ToolBook, VB6, and other 'RAD' tools. It's not so much about the language as all the 'batteries included' toys that come with it.

except that the old gui system ran on 650Mhz processors and 256MB RAM.

Re: JavaScript is Good, Actually

#220
post #171

Earlier quoted context omitted.

Oh, come on. So the guy uses some harmless exaggeration when selling himself on his own personal website & you're taking him to programmer jail over it? Do you frequently launch into personal attacks on authors whose articles you disagree with?

If a medical doctors classifies himself as world class and then posts articles about medical matters, then my expectation would be his world class-ness is evident. This guy's not writing an opinion piece about which brand ketchup tastes best. He has published an opinion piece in which he speaks authoritatively about matters related to the domain he claims he's a world expert in. As for the harmless exaggeration, it's…

> As for the harmless exaggeration, it's not harmless. It's poison to my chosen profession.

Now you seem to be the one exaggerating there. While yes I agree that is a crappy way of describing himself, there is no reason to start being so mean about it.

Post reply on HN