Viewing profile — throwaway234232
throwaway234232
HN member- Joined
- Fri, Jul 08, 2022, 11:28 PM UTC
- HN karma
- 28
- Public activity
- 15 items
- HN profile
- View on Hacker News ↗
About throwaway234232
No profile information was provided.
Recent public activity
-
comment
Comment #32117865
I agree, but they also include hashes.
-
comment
Comment #32117743
https://github.com/pypa/pip/issues/4732
-
comment
Comment #32117735
You don't need virtual environments when using npm or composer or cargo. They also create lock files with hashes by default. pip still doesn't use lock files. It's subpar compared …
-
comment
Comment #32111571
Your example doesn't help your argument here, as square should be taking `T` instead of `Option `, a good use case for `Option::map`. But if you are speaking about ergonomics of ha…
-
comment
Comment #32111432
This is a good use case for let-else, however I won't agree with you here on usage of unwrap for the sake of brevity. I will opt for `?` or match instead.
-
comment
Comment #32111062
The footgun here is that `unwrap` may be used inappropriately, and from what I see using github code search it's used inappropriately quite often.
-
comment
Comment #32109431
You can still use a null, however the point being made here is that null was failed to be included at type level. See these for reference * https://kotlinlang.org/docs/null-safety.…
-
comment
Comment #32078825
I've ran into this before, but to be fair I was using Monad Transformers.
-
comment
Comment #32047265
> Usually people recommend crates designed to make the experience better but that's a failure in my opinion. I agree, I love Rust, but I'd like to see error handling ergonomics imp…
-
comment
Comment #32047122
> I would think the Err(err) => return Err(err) line needlessly constructs a copy of result It sounds like this is coming from a C++ bias? So please forgive me if this is wrong. Ru…
-
comment
Comment #32035172
I think this may be good reference material: http://learnyouahaskell.com/types-and-typeclasses Basically I'm encoding this approach in Java.
-
comment
Comment #32035119
This is good news. My wishlist for Java is for null to be illegal for all types unless they are encoded as nullable such as `T?`. Until then, I just use Kotlin and/or Scala when I …
-
comment
Comment #32035052
Right, you can't overload the + operator, and primitives can't be used in generics.
-
comment
Comment #32029871
I think in Java, you would need to do a type-class approach. interface Numeric { T zero(); T add(T a, T b); } static T sum(Numeric n, T[] v) { T summer = n.zero(); for (int k = 0; …
- comment