Most active commenters
  • sunrunner(3)

←back to thread

498 points azhenley | 20 comments | | HN request time: 1.179s | source | bottom
1. slifin ◴[] No.45769470[source]
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

replies(4): >>45770105 #>>45770957 #>>45772455 #>>45772815 #
2. sunrunner ◴[] No.45770105[source]
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.
replies(3): >>45770358 #>>45771709 #>>45776003 #
3. dude250711 ◴[] No.45770358[source]
Removing barriers to sloppy code is a language feature.

That is why vibe coding, JavaScript and Python are so attractive.

replies(1): >>45770480 #
4. Xelbair ◴[] No.45770480{3}[source]
Removing barriers to civil engineering building design is a feature.

Who needs to calculate load bearing supports, walls, and floors when you can just vibe oversize it by 50%.

replies(1): >>45770876 #
5. huflungdung ◴[] No.45770876{4}[source]
Well if it does the job. So what?
6. sgt ◴[] No.45770957[source]
Clojure will always be faster than Python. So you have that, at least.
7. hn_throw2025 ◴[] No.45771709[source]
In the context of the original discussion, TypeScript (and ES6) has const and let.
replies(3): >>45771765 #>>45772007 #>>45772489 #
8. sunrunner ◴[] No.45771765{3}[source]
Fair enough about const and let, the obnoxiousness for me is a combination of the language ergonomics, language ecosystem, but mostly the techno-political decision making behind it.
9. dragonwriter ◴[] No.45772007{3}[source]
Neither let nor even const are immutable (const prevents reassignment but not mutation if the value is of a mutable type like object or array).
replies(2): >>45772137 #>>45777762 #
10. ◴[] No.45772137{4}[source]
11. ziml77 ◴[] No.45772455[source]
Rust taught me that a language does not have to be purely functional to have everything be an expression, and ever since I first used Rust years ago I've been wishing every other language worked that way. It's such a nice way to avoid or limit the scope of mutations
12. AstroBen ◴[] No.45772489{3}[source]
well yeah except const doesn't make objects or arrays immutable
replies(2): >>45772682 #>>45776864 #
13. catlifeonmars ◴[] No.45772682{4}[source]
I feel that Java’s “final” would have been a better choice than “const”. It doesn’t have the same confusing connotation.
14. nvader ◴[] No.45772815[source]
You are not a Clojure programmer. You use Clojure to solve problems in a professional context. I'm sorry that there's a political tribal war based on language going on at your workplace.

But especially now that coding agents are radically enabling gains in developer productivity, you don't need to feel excluded by the artificial tribal boundaries.

If you haven't, I recommend reading: https://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-pr...

replies(2): >>45773723 #>>45776754 #
15. jimbokun ◴[] No.45773723[source]
You know I read this when it came out but have gotten out of the habit of applying it.

Thanks for the reminder. Will work on putting these ideas back into practice again.

16. Garlef ◴[] No.45776003[source]
If you avoid metaprogramming and stick to the simple stuff, python and typescript are almost the same language.

To be fair, comprehensions (list/object expresions) are a nice feature that I miss a lot in JS/TS. But that's about it.

17. sunrunner ◴[] No.45776754[source]
I remember that post and essentially agree with everything in it and your points too.

However there's a real-world factor that I don't think it covers, which is that having ten years of experience in the ecosystem for any language almost guarantees that you're going to be faster, more efficient, more idiomatic, and generally more comfortable through familiarity with that language and its ecosystem than with any other 'drop in replacement'. And you'll also probably be more aware of what doesn't work, which is just as useful. You can always tell when someone knows their tools well when they can immediately tell you what sucks about them, and possibly even the history of it and why it might happen to make sense, even if seems bad.

This isn't an argument for favouring speed or efficiency, just an ackowledgement of what is lost when you choose or are forced to move to a different environment.

Languages are a lot more than just syntax. Language-specific features, conventions and common idioms, language implementation details that end up being valuable to understand, familiarity with core library, familiarity with third party libaries (including the ones that are so well-known as to almost be considered core), package management, documentation standards, related tooling, foreign-function interfaces and related tools to make that workable, release concerns. The list goes on.

There's no tribal boundary here, just a belief that time spent with a given tool and all its idiosyncrancies (and programming languages are their idosyncracies, otherwise they wouldn't be different) is valuable and not something to pass up, even if I agree with the thesis of the article.

Can you bootstrap your way to a passable, possibly even idiomatic, solution with coding agents? Yes. Does that mean you've managed to short circuit the results of long-term experience? I'm not so sure. Does it matter? Depends on the person or environment, I guess.

I don't think the learning curve for a new tool is a straight line (I imagine more logarithmic), so it's not that you'd need the same amount of exposure in terms of time, but that does imply the cost of changing is up-front.

There's also a difference between choosing to investigate a new language out of your own interest and having the time to do it properly, versus having some top-down mandate that you must now use <X>, meanwhile still having to meet the same deadlines as before.

18. MetaWhirledPeas ◴[] No.45776864{4}[source]
Yeah it makes their structure immutable? Something like that. Not useless but not what you would expect.

But for non-objects and non-arrays it's fine.

19. Kailhus ◴[] No.45777762{4}[source]
Yep, I believe you'd need to call Object.seal(foo) to prevent mutability. Haven't really had the chance to use it
replies(1): >>45778874 #
20. mwcz ◴[] No.45778874{5}[source]
Object.freeze is the one you're looking for.

const + Object.freeze is a lot to remember and cumbersome to use throughout a codebase, very relevant to Carmack's wish for immutability by default. I'm grateful Rust opted for that default.