2

I'm sure that some early programming languages didn't support comments. And perhaps some tiny interpreted languages did not.

Putting aside esoteric languages, what was the most recent significant language that didn't allow comments? Was there a rationale for this?

mikado
  • 177
  • 4
  • 3
    Hmm... Definitely isn't StackExchange... – Brian H Jun 21 '22 at 21:11
  • 2
    Have you any reference for that assumption, modern or not? Or any substantial reasoning why a language should not support comments? Not reading some input is about the most simple operation a compiler can do. already the very first assemblers, even before doing much else than translating op-symbols into binary, did support comment cards. Also, isn't asking for a most recent language contrary to RC.SE's scope of old contend. – Raffzahn Jun 21 '22 at 23:20
  • 2
    Putting aside that the answer can possibly change over time, how is asking about the most recent language retrocomputing? – user3840170 Jun 22 '22 at 05:14
  • 1
    If the most recent significant language without comments appeared in the 1960s, that seems quite retro – mikado Jun 22 '22 at 06:15
  • @mikado The most recent non-esoteric programming language that doesn't support comments is one I came up with four seconds ago. (Information correct at time of writing.) You can [edit] this question to make it on-topic – perhaps change "most recent" for "most popular" or something – but as it stands, it's asking about modern systems. – wizzwizz4 Jun 22 '22 at 11:26
  • 1
    @wizzwizz4 The question does say "significant". It seems unlikely that your new language will achieve this benchmark for sometime – mikado Jun 22 '22 at 12:00
  • @mikado What do you mean by "significant"? Would B be considered significant due to its influence on C, or insignificant because hardly anyone used it (outside a few pre-UNIX mainframe programs)? – wizzwizz4 Jun 22 '22 at 12:03
  • Trolling answer: JSON. – user3840170 Jun 28 '22 at 15:02

3 Answers3

8

I'll put forward the positively abysmal dialect of SQL that comes with Access 2000. Probably later versions as well.

You can either use the graphical query builder thing, which (badly) generates a query, or you can switch to a text-based editor. This editor has some features:

  • the whitespace, including newlines, is lost when you save the query or switch to the graphical editor. When you open it back up, the entire query is a single line with a space between every token.

  • The editor has a proportional font. You can not change this font, nor increase the size, so with modern resolutions, it's unusable.

As you ask about a rationale, the closest I can think is this: I suspect that the query is compiled and decompiled when the query is saved/loaded. So a comment would be lost anyway. Besides which, they were really pushing the graphical editor thingy they had. Big reason my arms are still sore today.

Omar and Lorraine
  • 38,883
  • 14
  • 134
  • 274
8

Many industrial control devices have domain-specific languages to perform sequences of operations. Some such devices that I have used allow using a rather primitive keypad of the device to edit the stored program without having to connect a computer (or phone, or whatever). It's been a while since I've used any such devices, but I would expect that some of them are still being developed, and that devices which don't have full alphabetic keyboards would limit program entry to the specific commands the units support.

supercat
  • 35,993
  • 3
  • 63
  • 159
3

I looked in the LISP 1.5 Programmer's Manual (1965) and found a reference to "comment":

Overlord direction cards are punched in Share symbolic format; the direction starts in column 8, and the comments field starts in column 16. Some Overlord cards will now be described.

"Overlord" appears to refer to a tape control language, which would not strictly be considered as part of the file contents (which is the LISP program code).

A complete sample program starts with the header

  * M948-1207 LEVIN, LISP, TEST, 2,3,250,0
          TEST WANG ALGORITHM FOR THE PROPOSITIONAL CALCULUS

This header appears to be repeated verbatim in the output. The header syntax does not appear to conform to LISP syntax, so it probably shouldn't be considered a "LISP comment", but rather is probably useful for an operator to sort out which output belongs to which program.

The ability to use ; to introduce comments in LISP source code appears to have evolved later than 1.5.

Greg Hewgill
  • 6,999
  • 1
  • 28
  • 32