How many spaces is a tab in Java, Rust, C+, Python, C#, Powershell, Golang, etc.
A tab is not made out of spaces. It is a tab, whether in Java, Python, Rust, or generic text file editing. It is represented by a single Unicode character, U+0009.
It does not generally mean “insert this many spaces here” either. It means “put the cursor at the next closest tab stop in the line”. What that means exactly depends on the context. On an old typewriter I had, a tab key would advance the roller to the next column that was a multiple of 10

That is pretty much the same function as the tab character does.
Just for reference, modern text editors have their tab stops set to either every 4 or every 8 characters. That doesn’t mean that 1 tab = 4/8 spaces, that means that putting in a tab will align the cursor with the next multiple of 4/8 columns

In mainstream IDEs you can set the tab key to insert a desired number of spaces instead of a tab character.
The concept of tab independent of space is rarely used these days. In any case, what the character represents is decoupled from what the key does is decoupled from what the screen shows.
In many IDEs, the tab character inserts the required number of spaces to advance to the next tab line. This is often a default.
I imagine it’s a compromise between tab loving extremists and space advocates. The ideal whitespace character is a subject of intense debate among programmers.
Source: Quora
- Lila Scavenger Hunt: A scenic, guided tour of the Lichess.org codebaseby /u/fz0718 (programming) on March 26, 2023 at 10:03 pm
submitted by /u/fz0718 [link] [comments]
- Procedural map generation in C++ — Part 2: A new hope with cellular automata and GPT4by /u/david-delassus (programming) on March 26, 2023 at 9:12 pm
submitted by /u/david-delassus [link] [comments]
- You can let ChatGPT run wild on random websites and do what it feels likeby /u/Independent_Fun1007 (programming) on March 26, 2023 at 8:36 pm
submitted by /u/Independent_Fun1007 [link] [comments]
- Software is not defined by the language it's written inby /u/simon_o (programming) on March 26, 2023 at 8:19 pm
submitted by /u/simon_o [link] [comments]
- Implementing Google, GitHub, and Custom Credential Login with Next.js and NextAuth.jsby /u/ritavdas (programming) on March 26, 2023 at 7:35 pm
submitted by /u/ritavdas [link] [comments]
- 10x Editor Version 1.0 Releasedby /u/slynch8 (programming) on March 26, 2023 at 7:31 pm
submitted by /u/slynch8 [link] [comments]
- Toward Disposable Softwareby /u/NiloCKM (programming) on March 26, 2023 at 7:30 pm
submitted by /u/NiloCKM [link] [comments]
- How we reduced our AWS bill by 7 figuresby /u/Witty-Play9499 (programming) on March 26, 2023 at 6:57 pm
submitted by /u/Witty-Play9499 [link] [comments]
- My evaluation of the Scaleway Cloud providerby /u/nfrankel (programming) on March 26, 2023 at 6:45 pm
submitted by /u/nfrankel [link] [comments]
- Cigna has built a system that allows its doctors to instantly reject batches of claims on medical grounds without opening the patient fileby /u/-grok (programming) on March 26, 2023 at 5:46 pm
submitted by /u/-grok [link] [comments]
- Using ChatGPT plugins with LLaMAby /u/balthierwings (programming) on March 26, 2023 at 3:34 pm
submitted by /u/balthierwings [link] [comments]
- Richard Stallman - How I do my Computingby /u/Witty-Play9499 (programming) on March 26, 2023 at 3:13 pm
submitted by /u/Witty-Play9499 [link] [comments]
- "Developers do nothing good after 45 hours of work." Solid point to remember from the head developer at Netflix given that people are being pressed to work even longer now. Stems from a larger discussion on stupid things orgs do to kill productivity.by /u/Peblooth (programming) on March 26, 2023 at 3:11 pm
submitted by /u/Peblooth [link] [comments]
- Understanding the Fundamentals of JavaScript: A Comprehensive Guideby Sanjam Singh (Programming on Medium) on March 26, 2023 at 1:58 pm
JavaScript is a versatile programming language that allows developers to build interactive and dynamic web pages. It is one of the three…Continue reading on Medium »
- The Journeyby Uc David (Programming on Medium) on March 26, 2023 at 1:54 pm
Okay.Continue reading on Medium »
- [The Engineering Room Ep. 16] Kent Beck On The FIRST Testing Frameworks, TDD, Waterfall & MOREby /u/Euphoricus (programming) on March 26, 2023 at 1:51 pm
submitted by /u/Euphoricus [link] [comments]
- 이펙티브 자바 — 아이템 64. 객체를 그들의 인터페이스로 참조하라 정리by ECHO (Programming on Medium) on March 26, 2023 at 1:46 pm
모든 것을 인터페이스로..Continue reading on Medium »
- Practical Guide: How to Build a Web Scraper with Laravel Actionsby Hendrik Prinsloo (Programming on Medium) on March 26, 2023 at 1:46 pm
In this walkthrough, we’ll build a simple web scraper from scratchContinue reading on Medium »
- My one-month push_swap journey: explore an easily understand and efficient algorithmby YYBer (Programming on Medium) on March 26, 2023 at 1:44 pm
I decided to write an article for push_swap to commemorate the confusion, frustration, growth and exhilaration I experienced this month.Continue reading on Medium »
- How to design search autocompletion using plain Javaby /u/willis7747 (programming) on March 26, 2023 at 1:36 pm
submitted by /u/willis7747 [link] [comments]
- Create Your First Blender Addonby Kent Edoloverio (Programming on Medium) on March 26, 2023 at 1:36 pm
Blender is a popular 3D modeling and animation software that enables creative young people to create visually stunning animations and…Continue reading on Medium »
- Getting Started with Tag Helpers in ASP.NET Blazor: A Beginner’s Guideby Amelia Gherdan (Programming on Medium) on March 26, 2023 at 1:32 pm
Tag Helpers are a key feature of ASP.NET Core, a popular web application development framework from Microsoft.Continue reading on Medium »
- ChatGPT Plugins : An Introductionby Meherban Singh (Programming on Medium) on March 26, 2023 at 1:29 pm
What is ChatGPT ?Continue reading on Medium »
- God Objectby Majid Ahmaditabar (Programming on Medium) on March 26, 2023 at 1:27 pm
In object oriented programming God object or God class and sometime omniscient or all-knowing object is an anti-pattern that references a…Continue reading on Medium »
- 9 Tools Programmerby Barongtrans.my.id (Programming on Medium) on March 26, 2023 at 1:20 pm
Topik Terkait APLIKASI DEBUGGING TOOLS DESKTOP IDE LAPTOP PERANGKAT LUNAK PROGRAMMER TEKNOLOGI TIPS & TRIK TIPS DAN TRIK VCS VMContinue reading on Medium »
- Ban 1+N in Djangoby /u/hackflow (programming) on March 26, 2023 at 12:07 pm
submitted by /u/hackflow [link] [comments]
- TypeScript vs JSDoc JavaScriptby /u/johnny_reilly (programming) on March 26, 2023 at 12:00 pm
submitted by /u/johnny_reilly [link] [comments]
- And Yet It Understandsby /u/KaeruCT (programming) on March 26, 2023 at 10:57 am
submitted by /u/KaeruCT [link] [comments]
- Implementing Algorithms from Research Papers - NASA ICER Image Compression Example in Python (inspired by r/therealoranges's post)by /u/YoTGDev (programming) on March 26, 2023 at 6:06 am
submitted by /u/YoTGDev [link] [comments]
- Proxmox doesn't handle daylight savings time, hangs systemd and breaks systemsby /u/LeeHide (programming) on March 26, 2023 at 12:47 am
submitted by /u/LeeHide [link] [comments]
- Distributed Software Systems at scaleby /u/minaandrawos (programming) on March 26, 2023 at 12:40 am
submitted by /u/minaandrawos [link] [comments]
- Writing a 3D game engine like it's 1995 againby /u/r_retrohacking_mod2 (programming) on March 25, 2023 at 9:45 pm
submitted by /u/r_retrohacking_mod2 [link] [comments]
- I made a deterministic ant simulator and built a competitive daily puzzle game around it. It's all open sourced.by /u/AntGameIO (programming) on March 25, 2023 at 4:22 pm
submitted by /u/AntGameIO [link] [comments]
- Sentimental Versioningby /u/mooreds (programming) on March 25, 2023 at 1:27 pm
submitted by /u/mooreds [link] [comments]
- Gordon Moore, Intel Co-Founder, Dies at 94by /u/unixbhaskar (programming) on March 25, 2023 at 1:05 am
submitted by /u/unixbhaskar [link] [comments]