For every fave this tweet gets, I will give you one #golang fun fact
Fact #1: according to the go spec, build tools should resolve imports in alphabetical order in order to ensure initialization remains the sa
Fact #2: -128/-1=-128 in #golang, but only sometimes.
Fact #3: identifiers are only exported if they’re part of the Unicode uppercase class, which makes Unicode support basically irrelevant.
Fact #4: go doesn’t have a ‘xor’ operator for Boolean values, but it DOES have a ‘xor’ operator for... integers.
Fact #5: go functions can return multiple values, kind of like tuples except 40 times harder to work with.
Fact #6: in go, integer division is a Euclidean domain, except when the dividend is nonnegative and the divisor is a constant power of two.
Fact #7: Since go requires alphabetized package imports, ‘go fmt’ is sort of part of the build system.
Fact #8: integer overflows aren’t actually an error in go, but only when they arise from +,-,*, or <<
Fact #9: instead of algebras sum types, go has iotas in constant declarations, which are kind of just worse in every feasible way.
Fact #10: go doesn’t have generics
Fact #11: go’s error handling has been compared to shoving spaghetti up your nose with a salad fork.
Fact #12: numeric constants are not allowed to overflow; you can’t put ‘NaN’ in your code unless it’s at runtime and sufficiently unexpected
Fact #13: for some reason, “runes” (literally just Unicode code points) are considered numeric constants too. God fucking knows why.
Fact #14: much like Haskell, go makes the mistake of treating code points as units of text. Unlike Haskell, it wasn’t created in 1998.
Fact #15: if you try to implement a library for recursion schemes in go, rob pike will burn your house down.
Fact #16: #golang has its own version of Goto statements, which means someone thought about this for more than two seconds AND STILL DID IT
Fact #17: Go’s package management is basically “github lol”, because apparently code points are numbers but versions aren’t.
Fact #18: if you change your github username, you break every package that depended on one of your packages (extra transition milestone!)
#19: channels are one of the better parts of #go, but debugging concurrent code for is about as fun as the theater when your name is Abraham
Fact 20: #golang is popular for web, probably because http was too easy and developers needed to worry about when dividing by two would work
#21: Rob pike is kind of like Jesus, if Jesus gave hungry people a programming language wisely crafted for their little poor person brains.
Fact #22: go, supremely elegant from its simplicity, kindly gives you a ‘&^=‘ operator.
Fact #23: 0010 is #Go for ‘eight’
Fact #24: ‘0xFace’ is #golang for ‘64206’
#25: during package initialization, the compiler doesn’t do real dependency analysis and instead pretends some orgy of strings is a solution
Fact #26: go depends on satan when computing arctangents golang.org/src/math/atan.…
Fact #27: go, in its infinite simplicity, kindly provides you with an isNaN() function, since ‘== NaN’ is too clear to be considered valid.
Fact #28: #golang’s math library has a function called J0, deftly designed to never be inscrutable to anyone who might steal you physics hw.
Fact #29: you can’t do Peano arithmetic on types in #golang, despite the fact that apparently ‘﷽’ is a numeric constant.
Fact #30: Rob Pike invented static binaries, because dynamic linking was too fast and CPUs needed a rest.
#31: if you’re tired of pl theory, try pl practice!! Go compiles to its own version of assembly and calls a bespoke assembler (2nd compiler)
#32: Go depends on approximately 6,000 environment variables at any given time.
#33: go’s compiler is extremely fast, giving you ample time to debug data races and deadlocks.
#34: go’s assembler can target IBM mainframes, in case you get sad that COBOL doesn’t have enough deadlocks.
#35: go has a library called ‘testing/quick’, which makes you think of ‘QuickCheck’, but not for very long because it’s just a fuzzer.
#36: go provides bit shifts for multiplication by two, in case you hear the phrase “premature optimization” and come.
These aren’t even facts anymore I’m just shitposting. But anyway,,,
#37: #golang is extremely close to the metal, which is especially appealing if you know nothing about how modern processors work.
Fact #38: go is supposedly a garbage collected language, but it has not once deleted itself nor any of my code.
Fact #39: Go has variadic functions, which are basically a way to avoid adding algebraic data types by swallowing a bomb.
Fact #40: for loops are basically maps/filters that suck their own dick and throw type safety out the window in the process.
#41: go is extremely good for reimplementing python tools and getting a nice speed boost while preserving all the runtime errors.
#42: the go community has a really cute webapp that generates a picture of you as a gopher and I’m jealous 😠😠
#43: go has ‘break’ statements, which are quite cleverly named: they will often break your code as well!
#44: Go can be transpiled to JavaScript, which is Satanic.
#45: array slices can take three different indices, much like literally any no other language in existence.
#46: relatedly, a slice containing three elements can have a capacity of four in case you need fine control of memory and also bugs.
#47: go has semicolons for some reason. Along with curly braces, they are what makes the language “fast”
#48: slices can have a lower, upper, and maximum index, but not a minimum index - just like the elegant simplicity of the Chinese board game
#49: James Damore probably wrote Go.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Loch Nessa Monster🌸

Loch Nessa Monster🌸 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(