Liste des Groupes | Revenir à cl c |
On 04/12/2024 22:31, Bart wrote:
And while you are at it, buy a better screen. You were apparently unable to read the bit where I said that /saving typing/ is a pathetic excuse.I can't type. It's not a bad excuse at all. I have also suffered from joint problems. (In the 1980s I was sometimes typing while wearing woolen gloves to lessen the impact. I haven't needed to now; maybe I've slowed down, but I do take more care.)
The concept is so simple that is not much about it for anyone to tweak.You said my namespaces were jumbled. They generally work as people expect, other than some different rules on name resolution.No, they work as /you/ expect. Not "people".
You designed the language for one person - you. It would be extraordinary if it did not work the way /you/ expect!Yep. And yet, it is not some obscure, exotic monstrosity. It's not that different from most others, and it's not that hard to understand.
That way they are influenced by lots of opinions, experiences, desires, and use-cases way beyond what any one person could ever have.A shame it didn't work for C!
So the way namespaces work in C++ is something that - by my rough finger-in-the-air estimates - dozens of people were involved in forming the plans, hundreds of people would have had a chance to comment andYeah. Design-by-committee. Just about every feature of C++ is a dog's dinner of overblown, over-complex features. C++ doesn't do 'simple'. (Look at the 'byte' type for example; it's not just a name for 'u8'!)
That suggests that the ratio of people who expect identifiers from namespaces to require namespace qualification unless you /explicitly/ request importing them into the current scope, compared to the people who expect namespaces to default to a jumble and overwhelm the current scope, is of the order of millions to one.They're not imported into the current scope, but an outer scope. Anything with the same name in the current scope will shadow those imports.
Yes - /sometimes/ file lookup uses some kind of path. That happens for specific cases, using explicitly set path lists. Who would be happy with an OS that when they tried to open a non-existent file "test.txt" from their current directory in an editor, the system searched the entire filesystem and all attached disks? When you use the command "tcc", would you be happy with a random choice - or error message - because someone else put a different program called "tcc.exe" on a network drive somewhere?That's exactly how Windows works. I think Linux works like that too: since tcc.exe is not a local file, and it doesn't use a path, it uses special rules to locate it. Somebody could mess about with those rules.
No, I don't agree with them. Yes, it is your choice for your language.My design is to allow default 'using namespace'; see above.
But you choose to talk about your language - so I can tell you why I think they are not good design choices.
Your compiler and tcc don't reach ankle-level to gcc, clang or even MSVCThat's good.
It doesn't show anything useful is possible. No one else wants to compile the limited subset of C that you want,That's not true. Thiago Adams would find it useful for one. Obviously I do.
nor do they want a C compiler written in some weird private language.Weird? There's a lot more weirdness in C!
But it is not an alternative for other people. It is not some kind of proof that compilers - real compilers for real work - don't have to be large.I suspect your prefered compilers wouldn't even run on a Cray-1 supercomputer, perhaps not even dozens of them.
Les messages affichés proviennent d'usenet.