SnowC

SnowC is a simple variant of C designed to remove redundant syntax from the code of competent programmers. The other kind can't be helped.

Obtaining And Compiling

You can download the entire source code and the test set I used. The whole thing is only 48kB.

https://xed.ch/p/snowc/snowc.tgz

To run it, you'll need to have gcc handy or whatever you normally use to compile C programs. You can download the directory ready to go with these commands.

cd /tmp  # Or whatever...
wget -qO- https://xed.ch/p/snowc/snowc.tgz | tar -xvzf -
cd snowc-???/
make
make test

Simple Example

A More Complex Example

Running

If you saved your program as x.c you can now process it in a normal sensible way.

./c2snowc x.c > x.cno
./snowc2c x.cno > X.c 

In theory, the X.c should compile and run as well as the original x.c. Sometimes it's fun to compare the before and after.

vimdiff x.c x.cno
vimdiff x.c X.c

Performance

It was originally written in pure C and performs like it. I did not use any external libraries. I did not even cheat by using regular expressions.

License

Software Freedom is very important to me. I wish to support the free software community which has supported me.

Copyright 2026 Chris X Edwards

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Yada YADA... You KNOW the DRILL.

The license should be available at https://www.gnu.org/licenses/gpl-3.0.txt. If for some reason it is not, a copy is distributed with this project at ./LICENSE.

Contact

Want to report a bug in SnowC? Want to tell me about some cool thing you made it do? Or wish you could make it do? You can send me an email!

My email address is: snowc at xed.ch

Frivolous Answered Questions

Are different indent levels allowed in the same SnowC file?

No. Python generously allows this questionable trick. SnowC does not. When converting from SnowC, the level indent spacing is auto-detected with the greatest common divisor of leading spaces. One reason the SnowC approach might be better for SnowC is that in C it is technically legal to have nonsense like this complete program:

void main() {{{return;}}}

Yes, that does compile! Might there ever be a sane need to have SnowC be able to produce something like that? Although SnowC can't do anything like that now, I think such things would require globally consistent indent spacing. This is why the Python flexibility was not explored or developed. I could change my mind though.

Is SnowC capitalized? How exactly does one refer to it?

Full project name
Semantic Non-Optional Whitespace C
One word project name
SnowC
Repository/directory name
snowc
File extension for the format
*.cno
Executables
snowc2c & c2snowc

Why should I not use SnowC?

Maybe you like curly braces. Maybe you like semicolons. Maybe you hate Python. Maybe your code breaks SnowC conversions. Maybe you want to fill your monitor up with extra unnecessary lines of code to make your colleagues think you're working. Maybe you're as old as I am and are just used to normal C. It's all good. Just remember, the reason we love C is that you've got choices.

Though your sins are like scarlet, they shall be as white as snow...