2 pointsby ingve2 hours ago1 comment
  • mitul0052 hours ago
    Go’s io package works so well because interfaces are implicit and lightweight.

    In C, you can mimic the shape with function pointers, but you lose a lot of the ergonomics and safety. Curious how far you can push composability before it becomes too cumbersome to use in practice.

    • jjgreen32 minutes ago
      A nit on the use of *: in lots of places there are "int* foo" and so on, but in C it's traditional to have "int *foo" since "int* foo, bar" looks like foo & bar are pointers, but they are not, bar is an int, while "int *foo, bar" suggests the interpretation that the compiler will make.