Subject: [pgjdbc/pgjdbc] issue #3635: Consider migrating from spaces to tabs

From: "vlsi (@vlsi)" <[email-masked]>
Date: Wed, 21 May 2025 19:27:23 +0000

See
* https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/

>i get approached by not one, but TWO coworkers who unfortunately are highly visually impaired,
and each has a different visual impairment
> * one of them uses tab-width 1 because he uses such a gigantic font-size
> * the other uses tab-width 8 and a really wide monitor
> * these guys have serious problems using codebases with spaces, they have to convert, do their work, and then unconvert before committing
> * these guys are not just being fussy — it's almost surprising they can code at all, it's kind of sad to watch but also inspiring

Code with tabs consumes [fewer cells on braille displays](https://stitcher.io/blog/tabs-are-better).
Code with tabs consumes the same or bigger amount of tokens when using [ChatGPT 4o tokenizer](https://platform.openai.com/tokenizer). For the small files the number of tokens is more-or-less the same, and a bigger [TrieNode.kt](https://github.com/Kotlin/kotlinx.collections.immutable/blob/bd5ac10f1e3b72c8bd6335005bf27d751e0d8b52/core/commonMain/src/implementations/immutableMap/TrieNode.kt) consumes 8958 tokens (32462 chars) with tabs, and it consumes 8859 tokens (37757 chars) which means 1% more LLM tokens when using tabs :-/

Of course, changing the spaces to tabs would be disruptive, however, it might bearable. I've not explored it yet.
However, it looks going with tabs is the right thing to do.

See:
* https://x.com/Rich_Harris/status/1541761871585464323
* https://github.com/prettier/prettier/issues/7475
* https://stitcher.io/blog/tabs-are-better
* https://youtrack.jetbrains.com/issue/KT-77740/Consider-moving-Kotlin-style-guide-to-tabs-for-the-accessibility-reasons

---

From: "davecramer (@davecramer)" <[email-masked]>
Date: Wed, 21 May 2025 20:10:02 +0000

Interesting... BTW, not sure if that is the reason but PostgreSQL uses tabs

---

From: "sehrope (@sehrope)" <[email-masked]>
Date: Thu, 22 May 2025 17:55:01 +0000

The git blame churn for this would be pretty annoying.

---

From: "vlsi (@vlsi)" <[email-masked]>
Date: Thu, 22 May 2025 23:21:07 +0000

git blame would not be impacted at all as we could add it as yet another commit to https://github.com/pgjdbc/pgjdbc/blob/master/.git-blame-ignore-revs