• 0 Posts
  • 482 Comments
Joined 1 year ago
cake
Cake day: June 21st, 2023

help-circle

  • For library code - yes, you’d usually want to direct users to the correct way of using the library, so you’d be more likely to come across fallible build functions or a bunch of type parameters to constrain when it can be called.

    For applications - honestly, it’s your code, so do what makes sense to you. Using a build function can help you ensure your settings were fully configured before using them, but it’s up to you if that’s the direction that makes the most sense to you. One benefit is you only need to perform the check once, but the downside is having another “built” type that you need to keep in sync with the original type. You can also look at libraries like derive_builder if you want to have your builder generated for you to avoid needing to manually update two separate types.












  • I don’t know if people have just gotten meaner over time or if that is how it has always been, but there are a lot of people who are very unpleasant to interact with, both on and off the internet. It can be stressful trying to interact with new people because it’s a dice roll on whether they’re friendly or condescending.

    Anyway, just my observation. I don’t know if that has anything to do with social media, but it wouldn’t surprise me I guess.







  • Ironically, I had friends in school who had come from juvy. I guess you could say prision fed into school instead? I’d love to ask them their opinions on that statement though and see how similar to prison school really was.

    As far as I can tell, that person is just rage baiting. If they genuinely believe school is the same as prison, having visited one myself (not for myself), all I can say is they should actually visit one and see for themselves what a prison is actually like.