4 ms·
Would it care about devs using multiple languages, switching back and forth, or people coming to C++ from other languages though? Of course program language de
by jraph 4y ago
Would it care about devs using multiple languages, switching back and forth, or people coming to C++ from other languages though?
Of course program language designers need to care about the ergonomics of their languages, and how it sits in the bigger ecosystem, it's their job. If they only target experts specialized in one language who don't practice other languages, that's just wrong if you ask me.
I was just suggesting a potential source of confusion, saying it's unfortunate. Not that this is wrong or anything.
Now, someone pointed out that C# does the same thing with "is" and "as" (which I didn't know, I don't know C#) so it seems they did take inspiration from the ecosystem and did not invent a potentially confusing language construct alone. That does not remove the confusion, but it's actually good they took the same syntax for a feature that already exists in the neighborhood.
- klyrs 4y ago> Would it care about devs using multiple languages, switching back and forth, or people coming to C++ from other languages though? I'm not sure where we'd draw the line, and "nobody can reuse a reserved word that any other language uses unless they're conceptually identical" seems completely misguided. If you're using multiple langues and switching back and forth, it's your responsibility to know those languages. I use 5 languages frequently, "switching" at least several times per day. I'm a grayhair, so maybe I'm taking my experience for granted, but this seems like an unreasonable burden to put on language designers.
- jraph 4y ago> and "nobody can reuse a reserved word that any other language uses unless they're conceptually identical" seems completely misguided I agree with this, and this would be far away from what I stated (that the "collision" is unfortunate). > If you're using multiple langues and switching back and forth, it's your responsibility to know those languages Absolutely, but we are human beings, we make mistakes, confusions are source of mistakes. This is perhaps unavoidable, and maybe using "is" what the best decision despite this, but still unfortunate. Maybe Python created this confusion in the first place, if Delphi had "is", with a meaning close to the C++ one.