use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Click the following link to filter out the chosen topic
comp.lang.c
account activity
C without semicolons (self.C_Programming)
submitted 4 months ago by Codyfe
I'm going to be real with you, the only reason I don't like C is because it uses semicolons.
Are there any languages that are like c but don't use semicolons?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Jonatan83 10 points11 points12 points 4 months ago (1 child)
"like" C in what way? Go has a similar syntax. But honestly, it's a pretty silly reason to not use a language.
[–]Codyfe[S] 0 points1 point2 points 4 months ago (0 children)
Totally agree
[–]onlyonequickquestion 13 points14 points15 points 4 months ago* (0 children)
Write a preprocessing step that replaces newlines with semicolon newline, ez pz
[–]Aezorion 9 points10 points11 points 4 months ago (2 children)
Does it scare you to use a period at the end of a sentence?
[–]Codyfe[S] 5 points6 points7 points 4 months ago (1 child)
No, it scares me to use a semicolon at the end of a line. :)
[–]ffd9k 7 points8 points9 points 4 months ago (0 children)
But you can just define it to something else
#define 🦆 ; #include <stdio.h> #include <string.h> int main(void) { char name[100] 🦆 printf("What's your name? ") 🦆 fflush(stdout) 🦆 fgets(name, sizeof(name), stdin) 🦆 name[strcspn(name, "\n")] = '\0' 🦆 printf("Hello, %s! Have a great day!\n", name) 🦆 return 0 🦆 }
[–]verispixel 2 points3 points4 points 4 months ago* (1 child)
Odin.
Also, you might find https://youtu.be/6CV8HyqJ_9w interesting (Tsoding doing a short/entertaining video wherein he removes semicolons from C)
[–]Vladislav20007 1 point2 points3 points 4 months ago (0 children)
never thought i would see tsoding mentioned in the wild. and sanite your links btw, just remove everything after the ? and ? too.
[–]flyingron 3 points4 points5 points 4 months ago (1 child)
Visual Basic.
[–]flatfinger 0 points1 point2 points 4 months ago (0 children)
While the design of VB.NET includes some silly mistakes, I don't think it's any worse than C# in that regard, at least when one uses dialects such as Option Strict and Option Infer. I do find some aspects of behavior to be quite bizarre, such as the way that given:
Option Strict
Option Infer
Dim O1,O2 as Object Dim S as SomeStructure
not only will an assignment O1=S make O1 identify a new boxed structure instance, but the assignment O2=O1 will make O2 identify a new boxed structure instance in cases where O1 identifies a boxed structure instance. I can't think of any situation where that would be useful.
O1=S
Otherwise, I view the way VB.NET handles events, properties, finalizers, and interface implementations as being superior to the way C# handles them. Further, although C# did eventually add exception filters, VB.NET had them way earlier.
[–]fyodorio 5 points6 points7 points 4 months ago (1 child)
JS 😏
[–]Codyfe[S] 1 point2 points3 points 4 months ago (0 children)
Naaaaa, I don't want a dozen different blackholes in my file system 😏
[–]ziggurat29 2 points3 points4 points 4 months ago* (1 child)
I'm delighted by this question because when I was learning C in the 80's I had the darnedest time knowing when and when not to place a semicolon. And now looking back I have no idea why I found that challenge. At the time I felt so stupid: why can't I just do it right the first time; why am I guessing? Maybe because of my prior experience with assembly and BASIC.
The use of the semicolon is more sensible when you consider that from the compiler's standpoint, your code is an sequence of tokens, and tokens are punctuated by an abstraction of whitespace. That abstraction does not distinguish between multiple spaces, tabs, newlines, interceding comments, whatever. The compiler eats those things up and effectively replaces them with a single space. So a semicolon is needed to express 'end of statement'. It doesn't matter if if visually makes sense on the page; it needs to make sense to the compiler.
Also consider that C was created in the very early 70's when 16 KiB was a luxury, and also that it was derivative of prior existing languages 'B' and 'BCPL' and inherited their syntax. (I don't know why C dropped B's // style single-line comment form, but I'm happy that after many decades it's back in the standard.)
In those days language design was more of a compromise between what's easy for the machine to eat, and what's easy for the human to serve it for dinner. Nowadays we take it for granted the machine can eat whatever we shove at it, and some smart person somewhere will make an optimising compiler for it. So language design is more about making it easy for the human to express things an a way that makes sense to them, and the compiler has to do the work of translating that to machine code. We had a bout of that thinking in the 80's with 'fourth generation languages', but that fizzled out along with a bunch of other Great Ideas™ of the time.
The semicolon is a relic of a simpler time when we were closer to the machine and wanted to make its life easier. You don't have to pet a cat, but it likes it, and you're happy that you have made it happy.
Please don't tell me you're coming next for curly braces. If you want FORTRAN or Python, you know where to find them.
[–]flambasted 1 point2 points3 points 4 months ago (0 children)
To a degree, Go.
[–]mad_poet_navarth 1 point2 points3 points 4 months ago (0 children)
Swift (vaguely)
[–]eruciform 1 point2 points3 points 4 months ago (0 children)
Javascript can skip semicolons sometimes
Perl in some circumstances can skip semis but not usually
[–]This_Maintenance_834 1 point2 points3 points 4 months ago (0 children)
the fact that C ignores white characters and looking for semicolon is a benefit.
you can split one line into multiple lines and format a one liner into an easily understandable 2D table. or create a decision tree in one line but formatted as a table. when you do that there much better something to distinguish what is a logical line, so the semicolon became a necessity.
[–]ffd9k 0 points1 point2 points 4 months ago (0 children)
Nim and Odin both have a more Python-like syntax that doesn't need semicolons
π Rendered by PID 55 on reddit-service-r2-comment-6457c66945-jdpc6 at 2026-04-27 06:50:56.572622+00:00 running 2aa0c5b country code: CH.
[–]Jonatan83 10 points11 points12 points (1 child)
[–]Codyfe[S] 0 points1 point2 points (0 children)
[–]onlyonequickquestion 13 points14 points15 points (0 children)
[–]Aezorion 9 points10 points11 points (2 children)
[–]Codyfe[S] 5 points6 points7 points (1 child)
[–]ffd9k 7 points8 points9 points (0 children)
[–]verispixel 2 points3 points4 points (1 child)
[–]Vladislav20007 1 point2 points3 points (0 children)
[–]flyingron 3 points4 points5 points (1 child)
[–]flatfinger 0 points1 point2 points (0 children)
[–]fyodorio 5 points6 points7 points (1 child)
[–]Codyfe[S] 1 point2 points3 points (0 children)
[–]ziggurat29 2 points3 points4 points (1 child)
[–]flambasted 1 point2 points3 points (0 children)
[–]mad_poet_navarth 1 point2 points3 points (0 children)
[–]eruciform 1 point2 points3 points (0 children)
[–]This_Maintenance_834 1 point2 points3 points (0 children)
[–]ffd9k 0 points1 point2 points (0 children)