Live data from Hacker News

John Carmack on mutable variables

twitter.com

241–250 of 663 posts

Re: John Carmack on mutable variables

#241
post #222
post #77

Earlier quoted context omitted.

Please don't post off-topic flamebait on HN. https://news.ycombinator.com/newsguidelines.html

How is it offtopic on a Twitter post by John Carmack to remark on the fact that John Carmack posts to Twitter?

Because it has nothing to do with the content and it's the kind of comment that is only made for the sake of stirring up feelings people have about Twitter and its owner, a topic that has been done to death for years on HN, and about which there is nothing new or interesting to say.

HN is a site that's specifically designed to focus on the new and interesting aspects of topics.

Re: John Carmack on mutable variables

#243

If designing your hypothetical ideal language, what are some intuitive/cute keywords you would choose for mutables/immutables? `let` is so 2020. `const` is too long. `static` makes me fall asleep at the keyboard. `con` sounds bad. How about `law`? law pi = 3.142 (heh typing on Mac autocompleted this) law c = 29979245 law law = "Dredd" or `set` or `once` or `make`?

What is wrong with let?

Re: John Carmack on mutable variables

#244
post #11

[flagged]

I hope this experimental language becomes usable eventually, all I hear is how you have to continuously rewrite to work around the borrow checker, accept worse performance to make everything message based, or just ignore the type system and write VB6-style code where everything is indexes in arrays to obfuscate ownership and paste 'unsafe' when it moans.

Re: John Carmack on mutable variables

#245
post #12

How fast this got to the top, you would think John Carmack just invented nuclear fusion.

I was part of the Carmack cult but the illusion was broken when I saw him use the same authoratative tone on a subject I'm more knowledgable about.

Such as? Any links to this?

Re: John Carmack on mutable variables

#246

He will like RUST very much.

Carmack had said he likes rust, he just isn't a language zealot. In rust though, the idiom would be to shadow intermediate variables often, which removes the debugger benefit.

> the idiom would be to shadow intermediate variables often

There is no idiom about this. Do it if you like but clipply doesn't warn about any of it.

Re: John Carmack on mutable variables

#247
post #241
post #222

Earlier quoted context omitted.

How is it offtopic on a Twitter post by John Carmack to remark on the fact that John Carmack posts to Twitter?

Because it has nothing to do with the content and it's the kind of comment that is only made for the sake of stirring up feelings people have about Twitter and its owner, a topic that has been done to death for years on HN, and about which there is nothing new or interesting to say. HN is a site that's specifically designed to focus on the new and interesting aspects of topics.

That Carmack still posts to Twitter (and QTs Curtis Yarvin) was news to me.

Re: John Carmack on mutable variables

#249
post #96

Yeah I wish variables were immutable by default and everything was an expression Oh well continues day job as a Clojure programmer that is actively threatened by an obnoxious python take over

As a Python programmer at day job, that is Clojure-curious and sadly only gets to use it for personal projects, and is currently threatened by an obnoxious TypeScript take over, I feel this.

In the context of the original discussion, TypeScript (and ES6) has const and let.

Re: John Carmack on mutable variables

#250

After a 2 year Clojure stint I find it very hard to explain the clarity that comes with immutability for programmers used to trigger effects with a mutation. I think it may be one of those things you have to see in order to understand.

I guess I'm not that good a programmer, because I don't really understand why variables that can't be varied are useful, or why you'd use that.

How do you write code that actually works?

Post reply on HN