<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ok-considered-harmful-sg0zhkc4o" -->

---
title: ok Considered Harmful | daily.dev
description: The post discusses the convention of naming boolean existence variables in Go as &#x27;ok&#x27;, and argues that it is harmful and should be replaced with a more...
canonical: https://daily.dev/posts/ok-considered-harmful-sg0zhkc4o
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: ok Considered Harmful | daily.dev
og:description: The post discusses the convention of naming boolean existence variables in Go as &#x27;ok&#x27;, and argues that it is harmful and should be replaced with a more...
og:url: https://daily.dev/posts/ok-considered-harmful-sg0zhkc4o
og:image: https://api.daily.dev/og/posts/Sg0zHKC4o.png
og:image:alt: ok Considered Harmful
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ok Considered Harmful

**[Lobsters](https://daily.dev/sources/lobsters)** · 10 min read · 5 upvotes · 1 comments

## Summary

The post discusses the convention of naming boolean existence variables in Go as 'ok', and argues that it is harmful and should be replaced with a more descriptive convention such as 'exists'. It provides examples and benefits of using the new convention.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.dolthub.com/blog/2024-05-10-ok-considered-harmful/>

## Community discussion

Top comments from developers on daily.dev.

**@mykytanikitenko42** · 0 upvotes

> ah, unfortunately, variable scoping sucks in go, you run out of identifiers very quickly, especially on package level

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#golang](https://daily.dev/tags/golang)

[View this post on daily.dev](https://daily.dev/posts/ok-considered-harmful-sg0zhkc4o)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"ok Considered Harmful","url":"https://daily.dev/posts/ok-considered-harmful-sg0zhkc4o","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ok-considered-harmful-sg0zhkc4o"},"datePublished":"2024-05-15T09:45:54.872Z","dateModified":"2024-05-15T09:45:52.658Z","description":"The post discusses the convention of naming boolean existence variables in Go as 'ok', and argues that it is harmful and should be replaced with a more...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7e68b8ff2a6ac0a3a6bba43f69a37f9b?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7e68b8ff2a6ac0a3a6bba43f69a37f9b?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/ok-considered-harmful-sg0zhkc4o","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"golang","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"ok Considered Harmful"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/ok-considered-harmful-sg0zhkc4o","comment":[{"@type":"Comment","text":"ah, unfortunately, variable scoping sucks in go, you run out of identifiers very quickly, especially on package level","datePublished":"2024-06-07T17:50:33.881Z","url":"https://daily.dev/posts/Sg0zHKC4o#c-wf1ifQQgt","author":{"@type":"Person","name":"Mykyta Nikitenko","url":"https://daily.dev/mykytanikitenko42","image":"https://lh3.googleusercontent.com/a/AAcHTtfurSXqjGczJrC4WFT2LrMQYjGe-Qrau5HTeaP1=s96-c"}}]}
```

