Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Only as good as Rust allows you to be, which is fine for some until they stagnate or grow out of it; but far from the final answer to anything.

I don't get at all how being forced to do anything could ever be a good thing. Smells like cognitive dissonance from here. I'm all for powerful tools that enables me to write better code faster; but being forced, really? That's the best thing about Rust? Ew.



Have you ever heard about the new thing called static typing programming language? I heard it force people to put only data with correct type into a function, it doesn't allow me to put any memory address I want to, such bad thing. Ew.

Jokes aside, I see rust borrow checker is just another dimension of type checking, it is type checking for access behavior and that's all about it.

Just as you can wrap your data in memory into static type system and leverage it to make a class of mistake impossible (passing wrong data to a function), you can wrap your access behavior into lifetime type system (converting raw pointer access behavior to reference with correct lifetime/access using unsafe) and make a class of mistake impossible.

In my definition, that's a powerful tools that help me to write better code faster.


> I don't get at all how being forced to do anything could ever be a good thing

If you don't prefer tools that can automatically check if you were a good developer or not, it not only does not scale (to trust the software you build), it's that I wouldn't want to work with you as a teammate.


> If you don't prefer tools that can automatically check if you were a good developer or not

You are pretending there are no trade offs.

> it not only does not scale (to trust the software you build)

I think we should all be able to agree that empirically that is nonsense.


I have empirically witnessed that the larger a project gets, the harder it is to trust that the code does the thing you want it to do. It's far from nonsense.


True, regardless of language.


Indeed, yet different languages seem to have different slopes.


If you only see the good, it means you are in love.


So all programming languages at a higher level than ASM are horrible to you? They don't allow you to write everything that pure ASM does. Even C enforces structured programming.


It's all black or white, right. Someone says something less than flattering about your latest ideology and the gloves come off. Consider not identifying so hard with your tools, for all our sake.

There are very few rules in C; same in Forth, Common Lisp and Perl among others; they provide tools, not religions. Python was always borderline.

These days it's like they're in some kind of competition to stuff as many rules as possible down peoples throats and get away with it. And that's not even the weird thing, the weird thing is that users are begging for more.


> Someone says something less than flattering about your latest ideology and the gloves come off.

Or, for an alternative view, someone makes an extreme statement like "I don't get at all how being forced to do anything could ever be a good thing" and when called on to explain it in common contexts you note how you are harshly being attacked because of someone's ideology.

> There are very few rules in C

There are tons of rules in C. You have to type your variables. You often have to cast between variables to change type. You've likely just internalized them and accepted them as common so you don't think of them as cumbersome.

> same in Forth, Common Lisp and Perl among others

Even Perl is opinionated in spots. Have you ever wondered why postconditionals only work on statements, and not blocks, while regular conditionals only work on blocks, and not statements? e.g.

  do_something() if $var_as_bool; # Valid
  { do_something(); } if $var_as_bool; # Invalid
  if ( $var_as_bool ) { do_something(); } # Valid
  if ( $var_as_bool ) do_something(); # Invalid
A choice was made to enhance the positive and suppress the negative aspects and possible uses of each.

The thing is, what Rust is doing with the borrow checker isn't even as subjective as that. It's enforcing a constraint which, like type constraints, is based in a mathematical understanding of how to entirely prevent certain classes of errors. Like most type systems, there are escape hatches to allow you to do what you need as long as you take responsibility. So, since it's in some aspects in concept and execution to type checking, it's natural to ask someone that is critical of it what they think of type checking, as it leads to a natural explanation of how it works and the benefits.

> And that's not even the weird thing, the weird thing is that users are begging for more.

People like street signs as well. That doesn't mean they are always followed, but it is useful to see how to work well within the system most the time.


It's not like Rust has many rules. There's unsafe, use it if you like. The rest is the minimum number of rules needed to guarantee some level of concurrency safety.

It's not like Rust has any rules just to make your code look funny.

> These days it's like they're in some kind of competition to stuff as many rules as possible down peoples throats and get away with it.

Could you expand on this please?

> And that's not even the weird thing, the weird thing is that users are begging for more.

... which users? And if the majority of them, then this perfectly explains the competition, but why are you surprised about the users' need for rules?


> I don't get at all how being forced to do anything could ever be a good thing.

So anarchy it is, then?


If those two were the only options, definitely.

But they're not.


You're statement implies there are only two options.

> I don't get at all how being forced to do anything could ever be a good thing.

You specifically say that being forced to do anything couldn't be a good thing. The only other option is for nothing to be forced.


I'd chalk it up to the old advice of "learn new programming languages that teach you something new [because you'll become a better programmer]" applying to Rust, as there is something new to most programmers in it. I remain skeptical that a total beginner starting with just Rust will be any better of a programmer (however you're measuring that) than another beginner who had started with, say, Python, giving both a year.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: