News for hackers. Stuff that matters.
Re:Speed of Rust vs. C by anfilt on Saturday March 13, 2021 @05:35AM (#26445617)
Firefox's is compiled code is mostly written in C++ not C. You conflate C with C++, Java, and C#. C++ while has source compatibility with C tends to end up much different than C. C will not give you the OOP hell-scape you can dig yourself into with those three languages. C code tends be simpler and much more close to the assembly that will be generated than you would get in those language. Moreover, Java and C# are not even compiled. Anyways C != C++. C++ has changed quite a bit since it's earlier days and has diverged from plain C in a lot of ways. Some people even feel C++ keeps adding too many new features too fast.
Re:Speed of Rust vs. C by eru on Saturday March 13, 2021 @08:18AM (#26446349)
> Some people even feel C++ keeps adding too many new features too fast.

It's not so much that they keep adding features, but that they (almost?) never remove any.

Re:Speed of Rust vs. C by pjmlp on Saturday March 13, 2021 @12:49PM (#26448293)
Python 3 has shown the world what happens when that is done without bringing the ecosystem along.
Re:Speed of Rust vs. C by eru on Sunday March 14, 2021 @01:15AM (#26453209)
Haskell has also removed some features over time.
Re:Speed of Rust vs. C by pjmlp on Sunday March 14, 2021 @04:18AM (#26453608)
Haskell or GHC?

If you mean GHC, the language version is whatever the pile of configuration flags at each source file ends up meaning, some of them even contradict themselves.

Great for language research, which is Haskell main purpose in life, hardly a good idea for getting industry love.

Re:Speed of Rust vs. C by eru on Sunday March 14, 2021 @07:36AM (#26454500)
I am talking about Haskell, specifically the removal of 'n+k patterns' and 'monad comprehensions'.

About GHC: I think their approach with pragmas is great and something for other languages to emulate. It's also great in production, with the caveat that you might want to restrict that mechanism to surface level changes only, and nothing that changes the intermediate format.

Re:Speed of Rust vs. C by anaerobicover on Saturday March 13, 2021 @01:47PM (#26448850)
Are there many other programming languages that remove features?
Re:Speed of Rust vs. C by eru on Sunday March 14, 2021 @01:16AM (#26453212)
Python 3 made some backwards incompatible changes. Haskell removed some features over time, as well.
Re:Speed of Rust vs. C by ttt0 on Saturday March 13, 2021 @06:50AM (#26445971)
> C++ while has source compatibility with C

It doesn't really, some things from C won't compile in C++, but that's a minor nitpick

Re:Speed of Rust vs. C by ben0x539 on Saturday March 13, 2021 @08:05AM (#26446290)
I guess people mostly take source compatibility to mean that you can write the headers for your C library so that it can be used from C++. That's not the same thing as C being a proper subset of C++ or whatever, but it's still a vast enough advantage of C++ over most competitors that it might as well be.