[–] 4 points 1 month ago (5 children)

I don't think mutability is wrong as a concept, albeit I enjoyed learning and toying with Haskell, but I really think these functions in Python should have been two sets of operations, one set to do what a += b does and one set to do what a = a + b does.

I've been doing C++ for quite some time and amount of implicit things that happen magically and not everyone get them right and this leads to bugs and confusion had really grown on me with time, and I feel like this is the same pattern here, where we get implicit magic instead of being clear with intentions and results

  • source
  • parent
  • context
  • [–] 3 points 1 month ago

    This one:

    fn resize(width: u32, height: u32) {}
    fn offset(dx: u32, dy: u32) {}
    
    let f: fn(u32, u32) = if resizing { resize } else { offset };
    

    gets rewritten to something non-equivalent:

    struct Size {
        width: u32,
        height: u32,
    }
    
    fn resize(size: Size) {}
    
    // No more arguing about arguments
    let f: fn(Size) = resize;
    

    But I would say that the original idea of applying wildly different functions depending on a flag shouldn't be easily achievable, because it's a bad idea a lot of times.

  • source
  • [–] 4 points 1 month ago* (last edited 1 month ago)

    That was what I prefer to read instead, but fine

    Edit: I did watch it, they don't even tell, because it was in the previous disclosure, so I now need to find and watch that one

    Edit2: and from reading https://gpg.fail/ with original vulnerability descriptions I can't understand how they did the trick with ISO, is the ISO signed as if it were plaintext and allowed truncated lines? If so, this does look pretty bad both on implementation side and on user side, imo

  • source
  • parent
  • context
  • [–] 5 points 1 month ago (1 child)

    At first I thought it's a good idea. Now I think that maybe cars flying past may be a problem if something happens and someone falls or just swings out of lane, then it would require a bigger space, but cars will likely just think that this space could also be used and fill it.

    On the other hand, I know nothing about how to organise these safely, and I'm always afraid of cars, so prefer to be on separate bike lanes whenever possible

  • source
  • parent
  • context
  • view more: ‹ prev next ›