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

I indeed really liked Ruby because of it's expresiveness, it being totally OO, the lovely readable and writeable syntax.

But yeah, that was 20 years ago. These days I find Kotlin to be the perfect fit for my projects, because of the static typing and its ergonomic syntax. I just don't feel confident about Ruby projects when they start growing. But, I still love the language, although mostly for small things.



Yeah. I was pretty neutral on ruby, until somewhere I worked some coworker put an @ on a variable relating to sessions and suddenly people started seeing each other's accounts.

Now some people won't fault the language for that, but it feels like a footgun and I've noticed a trend that often the worst (I.e. most dangerous) gravitate toward languages with the fewest safeties in them (less type safety, no compile checks, no memory safety, little concurrency safety, less safety around shared state)


Why do you think this is worse than someone saying about Java: "some coworker put `this.` on a variable relating to sessions and suddenly people started seeing each other's accounts"? Because it's less obvious what "@" means rather than "this."?

Edit: I forgot that Java has implicit `this`! That's so, so much worse!


This can happen it every language. I have seen the same thing happen in a project written in Java when someone has wrongly set the bean scope.


I'm pretty sure you mean @@ on a variable and are not common in a Ruby project. @@ is a class variable and I can see that causing all sorts of problems with data across sessions.


I have been using Ruby for 13 years and only once have I seen anybody use an @ on a variable…and it was part of a distributed caching strategy for an ad randomizer.


How about the fact that Ruby makes immutability difficult, and Hash does not copy keys on write and read? Almost every program uses a hash table, and Ruby makes them especially dangerous.


At least we have new features for immutability as part of Ractors.

e.g. Ractor.make_shareable(data)


Not totally though. Try `if.class` in IRB for example.

But the closest we have in any popular programming language, certainly.




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

Search: