News for hackers. Stuff that matters.
Re:“Rewrite It in Rust” Considered Harmful? [pdf] by JohnFen on Wednesday May 24, 2023 @12:39PM (#36060623)
> their language has a competitor?

I take issue with the notion that languages can have competitors. Languages are tools, and some languages are more suited to some tasks than others, but each has their place.

Saying languages compete with each other is a bit like saying different kinds of hammers compete with each other. They don't, each is just optimized for a different kind of hammering.

Re:“Rewrite It in Rust” Considered Harmful? [pdf] by nindalf on Wednesday May 24, 2023 @12:43PM (#36060699)
Thinking of languages as hammers or screwdrivers is too simplistic. Instead, think of languages as platforms.

Your productivity in any language is directly proportional to your time and effort investment in it. It's in your best interests to pick the language that's likely to thrive and spend time learning its ins and outs. On the flip side, betting on a horse that doesn't win could mean the loss of months or years of effort. This is why people evangelize the platforms they're invested in - convincing other people to join improves the health of the platform, increasing their return on investment. More adoption => more libraries => more projects => more jobs => more adoption. A virtuous cycle.

This evangelizing can sometimes become contentious if others perceive it as an attack on their platform. People defend their language mostly because they don't want to see it lose popularity. If it did, their language's viability is threatened and their investment is in jeopardy.

It's also partly because they've spent so working with this language that it's become a part of their identity. A critique of the tool is perceived as an attack on the person.

Re:“Rewrite It in Rust” Considered Harmful? [pdf] by JohnFen on Wednesday May 24, 2023 @12:50PM (#36060800)
I suppose my views are skewed because I have become competent or better in a large number of languages. I have my favorite general-purpose language, of course (it's C++-as-a-better-C), but I view choosing a language for a particular project to be an engineering decision that I make according to the demands of the project, not based on what language I personally enjoy the most.

Developers do get emotionally invested in their tools, and I've seen an uncountable number of holy wars because of that. But all of them strike me as being ludicrous.

If another dev uses a language I would not have chosen, that's not a personal affront to me. I assume they made an engineering decision that made sense for their situation. It's all good.

> If it did, their language's viability is threatened and their investment is in jeopardy.

I sorta see this, but in my experience, it's very easy to overstate this case. If a language is viable enough to develop in initially, it's viable. How popular it is or becomes isn't really that important except in terms of being a business decision ("is it possible to hire people in the future who know this language?")

Re:“Rewrite It in Rust” Considered Harmful? [pdf] by FrustratedMonky on Wednesday May 24, 2023 @12:44PM (#36060710)
This isn't true, there are different hammer manufacturers, and they market their products to steal market share from each other. There is a history of languages as locked in walled gardens with real competition. Java v .NET ring any bells?
Re:“Rewrite It in Rust” Considered Harmful? [pdf] by henrydark on Wednesday May 24, 2023 @12:46PM (#36060741)
I would be surprised if hammers didn't succumb to exactly the same type of competitions. Here are a few hammer review pieces, pitting metal against metal

https://www.nytimes.com/wirecutter/reviews/best-hammer/

https://www.gearhungry.com/best-hammers/

https://www.thespruce.com/best-hammers-4150485

Re:“Rewrite It in Rust” Considered Harmful? [pdf] by JohnFen on Wednesday May 24, 2023 @12:59PM (#36060953)
Those are comparing the same types of hammers from different manufacturers. My analogy is that different kinds of hammers don't compete with each other. A claw hammer, for instance, isn't competing with a ball peen hammer. They each are used for different kinds of tasks.
Re:“Rewrite It in Rust” Considered Harmful? [pdf] by nordsieck on Wednesday May 24, 2023 @01:04PM (#36061017)
> My analogy is that different kinds of hammers don't compete with each other.

Sure they do.

If you're doing framing, you might prefer a rigger's axe or a framing hammer.

If you're hanging an axe, you might prefer a mallet or a dead blow hammer.

There's lots of overlap, and hence competition, between different hammer types.

Re:“Rewrite It in Rust” Considered Harmful? [pdf] by qbrass on Wednesday May 24, 2023 @02:45PM (#36062380)
Just ask people what the round end of a ball peen is for. Few people know what peening is, fewer know how to do it, yet a ball peen hammer is still one of the most common hammers around. It's competing against other specialized hammers and winning because people simply have it already.
Re:“Rewrite It in Rust” Considered Harmful? [pdf] by circuit10 on Wednesday May 24, 2023 @01:06PM (#36061066)
If there’s overlap in what they can be used for then there will be competition there
Re:“Rewrite It in Rust” Considered Harmful? [pdf] by JohnFen on Wednesday May 24, 2023 @01:31PM (#36061448)
This is also replying to nordsieck, who made the same point.

You are both correct, but I was using "competition" in a different sense. I was thinking in terms of how people often talk about these issues: as if there was a One Language To Rule Them All. That is the notion that I object to.

When considering the best tool for a particular job, the different contenders are competing in a sense for that job. But I see that as not being the same as when people are asserting that a given language is always the superior choice independent of the task at hand.

The responses to my initial comment really surprise me. I had no idea I was saying anything controversial, but apparently I am!

Re:“Rewrite It in Rust” Considered Harmful? [pdf] by circuit10 on Thursday May 25, 2023 @10:35AM (#36071263)
Saying that languages compete isn’t the same thing as saying one language is objectively better than another. It just means that people might consider both options and weigh up the pros and cons of both. When people say that companies compete, they aren’t saying that one is objectively better than another, if anything it’s the opposite
Re:“Rewrite It in Rust” Considered Harmful? [pdf] by bcrosby95 on Wednesday May 24, 2023 @12:47PM (#36060760)
Imagine you only have a rock. A rock can be used for many things. You can use it to open a can, you can use it to smash things, you can use it to drive a nail.

Then someone invents a hammer. You no longer use a rock for driving nails.

Then someone invents a can opener. You no longer use a rock for opening cans.

Then someone invents gigantic sledge hammers. You no longer use a rock to smash things.

Languages definitely have competitors. Java took a lot of projects that would have otherwise been written in C++. Rust will take a lot of projects that would have otherwise been written in C or C++, but languages like Java weren't suitable for. Eventually, those two languages might be completely supplanted (but it would take a very long time). Because they lost to competitors in each space.

Re:“Rewrite It in Rust” Considered Harmful? [pdf] by JohnFen on Wednesday May 24, 2023 @12:56PM (#36060896)
Yeah, I'm not so sure. Certainly there are many cases where a language was used for a type of project when it isn't ideal -- but it was the best option. A new language can come along and replace the old for that sort of project. But I don't really see that as "competing" in any meaningful sense. It's just that someone invented a better kind of screwdriver for that kind of screw.

Some languages can certainly become obsolete (although even then, I'm hard pressed to think of a language that is no longer used at all) or relegated to very niche uses, of course.

Re:“Rewrite It in Rust” Considered Harmful? [pdf] by avgcorrection on Wednesday May 24, 2023 @05:32PM (#36064137)
> hammers

Just stop. Programming languages aren’t like carpentry tools at all.

For a programming language to survive you need a critical amount of users so that they can support each other by teaching each other, writing libraries, and influencing management in private and public industries to adopt the languages that are wanted. That naturally leads to at least some competetition for mindshare among developers, even (especially?) among the grassroots.

Just let this lame analogy die already.