Use of tabs in programming languages

What programming languages and scripts require the use of tabs?

none afaik

though indentation as a function of the alignment/grouping of program statements is in certain languages.

curious as to why are you asking ?
have you done any research on the subject ? ( please share findings if so )

This is not actually true.

Golang (Go) uses tabs:

Screen Shot 2022-06-09 at 8.16.45 PM

Reference:

Also, in a Google study, Google engineers found that tabs were more commonly used than spaces in both Go and C:

Screen Shot 2022-06-09 at 8.18.58 PM

Reference:

Tabs are "required" in Go, per Go specs (but since I am not a Go developer,I have no idea, really, just from reading)

HTH

Most languages that existed when 80 column cards were in use.
Cobol - columns 1-6 : sequence number, so if you dropped your deck of cards, you could take them to the card sorter and put them back in order.
column 7 continutation character
column 8 labels
column 12 regular statements, must end before column 73.
Fortran V and probably IV, columns 1-4 label
column 6 regular statements
RPG virtually every column has a specific use

See also:

tabs-vs-spaces-hithub

Reference:

The problem with the Github analysis is that no one knows if the editor that was used to create the source code translated tabs to spaces.

The Go / tabs issue is related to the go FMT official requirement. It's not a fluke of an editor.

Regarding GitHub, most developers, by a wide majority use VSC to edit / write code.

VSC does NOT translate tabs to spaces. I don't think any modern developer uses a code editor which automatically translates tabs to spaces or otherwise, except a syntax checker for Go, in a code editor when installed as a plugin because go fmt is used in these plugins for those who choose to install and use it.

Takes me back. I instantly thought "Those are not tabs, they are just fixed-column fields".

Then I recalled the "tabs" were physical movable stops on the platen of hand card punches. You hit the Tab button, and the platen moved to the next tab, which knocked back into the ratchet that spaced after each punched character. I could still punch these in my sleep (ICT codes). Our initial program cards were punched by a data prep bureau on electrical machines, but amendments (and the frequent card-reader wrecks) were fixed in the machine room by hand.

It seems to me that the keeping of tabs is mostly confined to old folks who cannot get past their old habits. The biggest problem is that things could look different on other people’s computers. When using tabs people know they actually consist of two spaces or four spaces or whatever they decided. But that information gets lost.

The "Old Habits" arose from the times when disks were pitifully small. The first disk pack I ever used was like one of those cake stands you get in posh tea-rooms: eleven platters, stacked about 12 inches high, and about 15 inches diameter. It came in a protective pack with a clip-on lid, and it held a whopping 30 MB initially (then 60, 100, 200 as they developed). So indenting nested blocks with one tab instead of four spaces was a significant improvement in both capacity and transfer rate.

Problems were not just transferring source between computers. If several people worked on the same project, they would each have their own preferred editor tab settings, and might replace all tabs by spaces or vice versa at different settings. After a few edits, the indentation of different sections became impossible to follow. Then some poor intern got the job of realigning a whole set of source files.

Makefiles specifically use tabs to introduce "recipes" -- the executable commands that make targets. (GNU/make allows the definition of an alternative single character.)

This is a frequent cause of of frustration. The old hands know to flick :set list and :set nolist every so often to make tabs visible (yes, all old hands use vi too). ;-)

Makefiles, YAML files, etc are not classified as programming languages.

The OP asked about programming languages not markup languages and file formats.

The OPs question was marked "solved" by the OP.

Topic is closed :slight_smile: