9 ms·
As I type this, every top-level comment here is a criticism or a nitpick. A cool new feature is being added to Ruby. People have done difficult and meaningful w
by tjstankus 4y ago
As I type this, every top-level comment here is a criticism or a nitpick. A cool new feature is being added to Ruby. People have done difficult and meaningful work that benefits others. And this is the response here.
I'm psyched for this feature. As someone who has worked primarily with Ruby and Elixir, I really appreciate the design and safety affordances of immutable data. I'm glad there's a bit more immutability in Ruby and that, in general, the language keeps progressing. Thank you Ruby language devs.
- fknorangesite 4y ago> As I type this, every top-level comment here is a criticism or a nitpick. This is maybe going to sound snarky, but honestly I really am being serious: at this point, what else do you expect from this website? HN has a well-earned reputation of being a bunch of kneejerk-critics and naysayers.
- tjstankus 4y agoI hear you and I agree. The HN vibe is nitpicky, for sure. I was a little surprised the comments here were 100% negative (or not positive, to be fair). I usually wouldn't bother reading all the comments, but I care about Ruby, so I was a little more irked by the negativity than usual. :)
- maxbond 4y agoPersonally, I do expect this behavior, but I also call it out, because I don't accept this behavior. For better or worse HN is my community. Its given me so much over the years, even as it's infuriated me much of the time. As I recognize patterns of dysfunction I highlight them, so that the community can understand & overcome them. And I do think I see incremental progress. Not to say I caused that progress, I have no idea what if any role I played from my modest soap box (I suspect very little), but I think there's every reason to hope for the better.
- nixpulvis 4y agoNot all critique is knee-jerk just because it comes quickly.
- CydeWeys 4y agoGood point. I can rattle off criticisms of an idea instantly if it happens to touch my little corner of the industry I've been working in for over eight years. It's rare at this point that I ever encounter a novel idea that I haven't already given thought to.
- joshspankit 4y agoThe core of that reputation is because people on HN want the best and many of them know that expecting the best can be an effective way of getting it. Yes, there are critics who are not ‘in the arena’, but for the rest I see a lot of care (AKA taste as defined in Ira Glass’ words on “The Gap”) put in to the comments.
- sidlls 4y agoThis is a very polite and optimistic way of putting it. Having been in this industry for 15+ years now, I have a more jaundiced view.
- code_biologist 4y agoI'm about 15ish years in and I have a jaundiced view of the jaundiced view. I've learned a lot of "the right way" things from HN that are genuinely better. True shop knowledge from people "in the arena" with expertise building and running the kind of systems I build and run. There are a lot of pricks though, to be sure.
- debaserab2 4y agoI have definitely learned a lot too but it’s rarely from the knee-jerk first responses on tech posts.
- maxbond 4y agoI'm sure there is a lot of care, but I also see a lot of people abusing the concept of care in order to troll. I have had/seen this conversation over and over again on HN: Commenter: This topic sucks, I wish people would stop posting it to HN. Me: I understand this topic isn't interesting to you. Why don't you ignore it and click on something else? Commenter: I care so deeply for this community, I hate to see this topic reduce it's SNR. Does the commenter care about HN? Presumably. Does that make their complaint legitimate? No. They're bothered by how a subset of people on the site want to discuss some topic, and they're manufacturing a reason that sounds better than, "I don't want to see it." But no one is entitled to have articles that are to their taste posted to HN. Sometimes this is expressed more like, "this isn't appropriate for the HN audience." But the audience of an HN post isn't what anyone imagines HN looks like, it's the subset of HN members who find that post in particular to be interesting and worthy of discussion.
- brianzelip 4y agoAppreciated your conversation here as well, https://www.codewithjason.com/podcast/11693222-164-oop-design-in-rails-with-tj-stankus/ https://www.codewithjason.com/podcast/11693222-164-oop-desig...
- tjstankus 4y agoThanks! That was a fun conversation.
- WirelessGigabit 4y agoDesign and safety in Ruby? Common. While my experience is mostly ROR I believe it reflects how Ruby is supposed to be developed. It's an insane convoluted system built to resemble the writing style of VB. So many aliases. So many different ways of doing things that are subtly different. The amount of time I have lost because of some piece of code (a block) that gets executed somewhere else and I have no clue how that works is insane. And every time I need to go and dig in the implementation details to identify the params passed in because there is no enforcement at write time. I want my types!!! Why would you voluntarily write code where you throw out the types. The thing that is most useful...
- donw 4y agoMy only criticism is that Ruby doesn't need more features. ES6 suffers from this disease to a fairly extreme degree, and you can see this schism in the JS community back to the semicolon war in the early 2000s. Kotlin as well, unfortunately, as it's otherwise generally a really nice language. There are so many language structures and shortcuts. And unless you spend a large amount of time becoming truly fluent in all of them, you're never going to be able to read all the "clever" code that uses them. These structures are not common across languages, either, so if you jump between codebases in multiple languages... good luck. tl;dr: Readability über alles.
- matheusmoreira 4y agoThe one feature Ruby absolutely needs is proper modules and libraries, like Python and Javascript. The current system modifies global name space and interpreter state, it's essentially #include from the C preprocessor.
- lmm 4y agoToxic positivity is what's causing the slow decline in HN. Inventing potential new features is easy; quickly culling bad ideas is the most vital part of real progress.
- halpmeh 4y agoPeople who like commenting on this website do so because they like to debate. If you agree with something you can upvote and move along. Like this comment, for instance, is an attempt to refine an idea posited by you regarding the mentality of HN commenters. For some reason, I enjoy that. Regarding this feature, it's cool but I'm surprised they introduced a new concept just to add immutable structs.
- bmacho 4y agoAren't the type of comments "Yay, I'm glad, I was so waiting for this" kinda useless, forbidden, and should we downvote and flag them.
- matheusmoreira 4y agoI agree. I come here for the comments. Most of the time I barely care about TFA itself. I just want to learn something new by reading what smart people are saying. Formed and refined a lot of opinions during my time here.
- bigtunacan 4y agoI can see why this was added, but I don't see myself using it anytime soon. If I just need a bundle of attributes and don't care about immutability then I will continue to use Struct. If I do need immutability I will continue to use dry-struct (https://dry-rb.org/gems/dry-struct/1.0/ https://dry-rb.org/gems/dry-struct/1.0/) which has much deeper guarantees of immutability and type enforcement.
- sacnoradhq 4y agoConcurrent::ImmutableStruct is thread-safe and tested. Dry is cute, but too new.
- bhaak 4y ago5 years old is too new? concurrent-ruby is only 3 years older.
- bigtunacan 4y agoDry is mature and has additional support for Monads, thread safe containers, schemas. I'm leveraging more than just struct from Dry.
- djur 4y agoYeah, I'm happy to see this. Every Ruby shop I've worked for has some kind of hand-rolled immutable struct, possibly in addition to various implementations provided by libraries. The backwards compatibility reasoning for not adding an immutable flag to Struct (my first instinct) makes sense. Struct has always been kind of wonky anyway. Getting both positional and kwargs for free is great. I also appreciate that they kept the implementation minimal for now. The pull request shows a very elegant way of implementing default arguments using only language features, which is a good sign: Measure = Data.define(:amount, :unit) do def initialize(amount:, unit: '-none-') = super end
- bigtunacan 4y agoThe libraries that provide immutability often provide stronger enforcement than this new Data class. I like the idea of something like this as part of Ruby core, but this was a chance to do it right and I don't think they took it far enough.
- djur 4y agoYou're thinking deep immutability? I'm not sure that's ever going to make sense to bundle with the language. Too many caveats. I'd rather see incremental additions to this minimal Data API than trying to do too much at once. Lots of love for the Ruby dev team but they don't always have the clearest idea of what problems their users are trying to solve.
- bigtunacan 4y agoYes, that's exactly what I was thinking. The problem is that without deep immutability this is still open to abuse/miss-use. When I'm creating an immutable struct I'm trying to prevent future developers from accidental mistakes.
- sacnoradhq 4y agoReinventing the wheel is cancer to support. There's already Concurrent::ImmutableStruct.
- lbrito 4y agoRuby is one of those things people love to hate. I've worked with Ruby for nearly ten years and have been hearing some variation of "Ruby is dying" since forever.
- thesz 4y agohttps://www.youtube.com/watch?v=06x8Wf2r2Mc https://www.youtube.com/watch?v=06x8Wf2r2Mc - at 10:52 Simon Peyton-Jones talks about life of programming languages. Ruby, having at least million users around the world, is in immortal category. What fascinated me in the original post is "...data model on the principles of the Value Object, introduced by Martin Fowler." I mentioned Haskell because there is a long, long history of the use of immutable objects in computing science, dating back to Church and Turing's communication. The immutability is what differentiates lambda calculus and Turing machine. That is why I remembered Haskell and the video above. Yet, it is "introduced by Martin Fowler," for some reasons. This is very sad.
- revskill 4y agoThose Java Enterprisey guys as Martin Folwer is the reason i stop caring about Enterprise. Shitty stuffs get complicated for no reason.
- pjmlp 4y agoPeople love to bash Java for what has been typical enterprise architectures since large corporations have used computers. Or do people think that before Java we didn't have any architecture astronauts on large corporations?!?
- revskill 4y agoHacking on Java frameworks is mostly a pain. Both from IDE tooling (too much RAM, configuration fighting,...) to the documentation. Basically it made simple problems harder for just "JAVA" reason. For comparison, i've spent many months to hack on Java framework in a company before to deliver a hackable feature. By the same time, i also released 3 production applications from scratch with Rails. The issue is not Java is impossible to have such productivity, it's the mindset, the culture issues from Enterprisey people.
- riffraff 4y agoRemember HN comments go in waves, at a point top rated comments are positive, then they turn to negatives as people react to negativity and viceversa. You should not worry about what top-level comments are.
- replwoacause 4y agoLove this attitude. We need more of it around here.