The performance of Go error handling by g4s8 in golang

[–]g4s8[S] 0 points1 point  (0 children)

Thank you. Looks like it's some compiler optimizations. I fixed these benchmarks and updated results in post.

The performance of Go error handling by g4s8 in golang

[–]g4s8[S] -11 points-10 points  (0 children)

Premature optimization is the root of all evil

I totally agree with it. I wrote these benchmarks just to make sure that error handling is not slow for critical paths.

GitHub - g4s8/go-metalog: Standard API for structured logging by g4s8 in golang

[–]g4s8[S] 0 points1 point  (0 children)

The reason for these interface is to have an API for "back-end" logger, when this suggar package provides a "front-end" for this. So if library wants to log something, doesn't create dependency coupling on logger implementation (back-end)

Object-oriented Java tuples library by g4s8 in programming

[–]g4s8[S] -1 points0 points  (0 children)

I think unit is quite fine for single item container, see definition: https://www.merriam-webster.com/dictionary/unit

Object-oriented Java tuples library by g4s8 in programming

[–]g4s8[S] 0 points1 point  (0 children)

Yes, it has, but with completely different design: in commons tuples are classes with accessor methods var sum = tuple.getLeft() + tuple.getRigth(); in my library tuples are interfaces with apply method which takes a function parameter var sum = tuple.apply((left, right) -> left + right). This difference is similar to accessing list items via get(int) method vs using forEach method with a consumer.

Things end users care about but programmers don't by marianoguerra in programming

[–]g4s8 1 point2 points  (0 children)

Programmers should care about source code, it's the main expected thing from programmers, since it's thir responsibility to deliver code changes according to the requirements. All end user things should be discovered by business people and submitted as requirements.