DEV Community

Juha Autero
Juha Autero

Posted on

1

You Can't Write Carrier Grade Software in Go

because it doesn't have assert.

Top comments (3)

Collapse
 
curtisfenner profile image
Curtis Fenner

The lack of assert is definitely the strangest omission in Go to me. They say they didn't include it because they were afraid programmers would use it instead of handling error cases, but I have literally never seen code and thought this code has too many asserts. Most code needs a whole lot more asserts, really.

Collapse
 
jautero profile image
Juha Autero

The joke is that I've seen lot of "carrier grade" code that is basically

ptr=malloc(BYTES);
assert(ptr);
Collapse
 
curtisfenner profile image
Curtis Fenner

well, tripping an assert is at least better than memory corruption ¯\_(ツ)_/¯

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay