18 Matching Annotations
  1. Oct 2020
  2. Jun 2020
  3. May 2020
    1. we should never blindly apply dogmatic advice, and that we should use our judgment each and every time.

      menjadi manusia berkesedaran, memiliki pemikiran sendiri, jangan menelan mentah-mentah apa yang dibaca

  4. Apr 2020
    1. If the word “share” doesn’t come out of your mouth, you don’t need to use a pointer

      key point

    2. The benefit of passing data “by value” is readability. The value you see in the function call is what is copied and received on the other side

      no hidden cost, eg., memory growth on the heap or pauses during garbage collection. but there is a cost in stack memory usage and "scoping" among multiple stack frames, CPU caching, etc.

    3. Functions execute within the scope of frame boundaries that provide an individual memory space for each respective function. Each frame allows a function to operate within their own context and also provides flow control. A function has direct access to the memory inside its frame, through the frame pointer, but access to memory outside its frame requires indirect access. For a function to access memory outside of its frame, that memory must be shared with the function.

      eg., shared via the "pointer" to an address in heap memory

  5. Oct 2019
    1. The log will become something of a commoditized interface, with many algorithms and implementations competing to provide the best guarantees and optimal performance.

      Are golang channels an implementation of log?

  6. Aug 2019
  7. May 2019
    1. Go Programming Language publicly in 2009 they were also looking to solve certain challenges of the existing Computer languages. Of the many features that it demonstrated (we will get to those soon enough) it was also helpful in addressing the strange dilemma of hardware and software that was emerging.

      Golang is a modern computing language, designed especially for modern computing needs.

  8. Mar 2019
  9. Jan 2018
  10. Sep 2017
  11. Jul 2017
    1. (It's usually a mistake to pass back the concrete type of an error rather than error, for reasons discussed in the Go FAQ, but it's the right thing to do here because ServeHTTP is the only place that sees the value and uses its contents.)

      Good clarifying comment on when to pass back the concrete type of an error.

  12. Jan 2017
  13. Jul 2016
    1. There are two reasons for having no warnings. First, if it's worth complaining about, it's worth fixing in the code.
  14. Aug 2015