back

by uecker·1mo ago·view on hn ↗
By complexity I mean roughly the number of language rules / techniques / idioms a programmer has to understand and keep in their head to be able to program effectively. I would say this is far lower in C than in Rust. I do not see how the additional hoops Rust makes you jump through makes it easier to achieve a goal, but I see how it can help prevent certain errors (but not many others).

It also seems obvious that the problematic aspect of getting anything done in Rust is fully compensated by having a lot of libraries available quickly via Cargo, so people are essentially just assembling things at a high-level. And in principle, I think this is a very good thing, but in the way this is implemented it comes with severe supply chain risks.

1 comments
I guess that depends on what goals you have in mind. If they are producing a correct program, then having the compiler verify your assumptions, forcing you do deal with domain complexity upfront is one way to do that. Tests( driven development) is another one.

But in this context I feel that partial solutions are offered as alternatives to more complete ones. I.e.: if holes in your trousers is of no concern, then having tools to avoid that is of no value.

Not picking on C here, as already mentioned, it is a wonderful language.

In my experience is it also possible to avoid most holes in the trousers easily with C as well and not just by testing. For example, it is also often possible to build safe abstractions by designing an API around an incomplete type etc.
C is turing complete so of course. You can do anything with C but that is not the issue we are discussing here.