News for hackers. Stuff that matters.
Re:JavaScript Is C by mirekrusin on Tuesday October 29, 2019 @05:45AM (#21385421)
Next week - "Haskell is C" - because you can write program that compiles and doesn't do what you want.

Nobody ever claimed that flow/typescript magically makes your code bug free.

It will help with stupid mistakes. It will help with invariants at the type level, but it won't guarantee anything because there are ways to supress it. It will not help with value/runtime invariants because it doesn't have any dependat-type constructs (you can use things like flow-runtime to get some extra help if needed during runtime, but it will be likely slow if you use it everywhere, maybe cherry picked places is good compromise, depends on what you're trying to solve).

Things like immutable collections and/or better architecture should help.

Re:JavaScript Is C by ylyn on Tuesday October 29, 2019 @06:57AM (#21385731)
The author isn't claiming that someone claimed that either.

S/he's just saying that s/he likes Rust/Elm because they check more invariants than C/TypeScript.

In other words, "no one said it does" isn't really a useful response to "I don't like X as much as Y because X doesn't do A but Y does."

Re:JavaScript Is C by yoz-y on Tuesday October 29, 2019 @09:01AM (#21386609)
They might not claim that but the article’s title and gist still is “JavaScript is C because of this one reason”. This kind of comparison is just not useful.
Re:JavaScript Is C by bovermyer on Tuesday October 29, 2019 @09:31AM (#21386879)
I disagree. It changed how I think about JavaScript a little. As such, it was useful for me.

Be mindful that you do not mistake what we think for how we think.

Re:JavaScript Is C by yoz-y on Tuesday October 29, 2019 @10:13AM (#21387365)
I think the point the article makes is good, I just don't like how the comparison was made. I don't think the article would be of less value if the author dropped the "JavaScript is C" peppered all around it.
Re:JavaScript Is C by chriskrycho on Tuesday October 29, 2019 @10:32AM (#21387562)
It's a fair point. That's the trick with a blog post where you're basically "thinking out loud." This is just the way that the little switch flipped in my head as I was thinking through things that day: The experience felt very similar.
Re:JavaScript Is C by CathedralBorrow on Tuesday October 29, 2019 @11:40AM (#21388393)
Is there a difference between "I don't like this" and "This is not useful"?
Re:JavaScript Is C by yoz-y on Tuesday October 29, 2019 @12:29PM (#21389008)
There is. But in this particular case I stand by my point, a cursory glance will show that JavaScript is nothing like C. Starting an article with such a premise and re-stating it repeatedly smells like clickbait to me. Also it devaluates the point made by the article which is actually good.
Re:JavaScript Is C by fwip on Tuesday October 29, 2019 @12:08PM (#21388726)
You can just use "they."
[dead]
Re:JavaScript Is C by gatherhunterer on Tuesday October 29, 2019 @09:58AM (#21387205)
It is still considered incorrect by many. Some but not all dictionaries and style guides have adopted “they” and “them” as singular gender-ambiguous pronouns.
Re:JavaScript Is C by Bantros on Tuesday October 29, 2019 @09:20AM (#21386766)
It only took one hour
Re:JavaScript Is C by t0astbread on Tuesday October 29, 2019 @09:44AM (#21387039)
Yeah and that's good
Re:JavaScript Is C by manthedudeguy on Tuesday October 29, 2019 @08:18AM (#21386270)
Or just pick he or she. Not a big deal.
Re:JavaScript Is C by adamsea on Tuesday October 29, 2019 @10:33AM (#21387572)
Like she, manthedudeguy, said, its not a big deal ;)
Re:JavaScript Is C by manthedudeguy on Tuesday October 29, 2019 @12:23PM (#21388922)
I agree with Adam here, she gets it.
[dead]
Re:JavaScript Is C by astura on Tuesday October 29, 2019 @08:58AM (#21386576)
Chris is commonly both a male and female name (is a diminutive of Christopher, Christine, Christina, Christian, and probably others).
Re:JavaScript Is C by slacka on Tuesday October 29, 2019 @10:05AM (#21387278)
Then use "they" or if you're really that concerned with making a mistake, spend 2 seconds to google them, and you will see that this Chris is a "He" from the first hit on a google of "Chris Krycho".

https://twitter.com/chriskrycho?lang=en

Re:JavaScript Is C by manthedudeguy on Tuesday October 29, 2019 @12:24PM (#21388947)
The point of my post is that one shouldn't be "that concerned with making a mistake", so once again, choose any. It is not a big deal.
Re:JavaScript Is C by toastal on Tuesday October 29, 2019 @08:54AM (#21386542)
Chris is a fairly gender neutral name. Just say 'they'; it's in the dictionary now for gender neutrality so no reason not to.
Re:JavaScript Is C by bovermyer on Tuesday October 29, 2019 @09:29AM (#21386859)
The article, nor Chris's website itself, does not give any indication to his gender.

However, he is a co-host on the podcast "Winning Slowly," and that website refers to him as a "he."

Re:JavaScript Is C by GordonS on Tuesday October 29, 2019 @08:53AM (#21386532)
Chris could be a male or female name, so not terribly helpful in this case.
Re:JavaScript Is C by Koshkin on Tuesday October 29, 2019 @09:01AM (#21386607)
There's also the issue of gender identity.
Re:JavaScript Is C by devin on Tuesday October 29, 2019 @09:00AM (#21386596)
The name “Chris” is unisex.
Re:JavaScript Is C by chriskrycho on Tuesday October 29, 2019 @10:12AM (#21387355)
The difference is in what a developer can express. As has often been noted: you can write FORTRAN in any language. But that doesn't mean I will opt for Fortran (except perhaps for some specific numeric computing cases! Then I might!) when other tools allow me to capture more invariants in my program.

The fact that the compiler doesn't make me is orthogonal to the point I was getting at in this article. It allows me to capture constraints and invariants that matter to me, and it enforces certain constraints and invariants on all developers. That combo can be—and in my experience working a lot in C and JS as well as in richly typed modern languages like TS, Rust, Elm, etc.—very, very powerful and rewarding.

(Also: TS gets surprisingly far on dynamic runtime inspection. While I'd love to see the ideas in Idris become far more mainstream, in the meantime, the stuff TS is doing with type narrowing, mapped types, conditional types, and so on is nothing short of astounding. You can do some pretty wild stuff that isn't quite dependent types but gets awfully close. But caveat emptor: compile times may get you.)

Re:JavaScript Is C by collyw on Tuesday October 29, 2019 @10:55AM (#21387845)
I have seen it claimed with Rust that "if it complies it will run". I managed to get it to compile and crash in my brief encounter with it.