Live data from Hacker News

Pretty.c

github.com

31–40 of 227 posts

Re: Pretty.c

#31
Meta: the naming is ... strange.

The actual name of the repo is "pretty.c", but the name used for the language/dialect/result/horrorshow[*] is "Pretty C".

The actual code file you include is called "pretty.h", which makes sense since it's a header, of course. Confusing!

Edit: escapes.

[*] Yes, I'm a C programmer, currently hunting for black-marked insulin to combat the rapid-onset diabetic attack from all that sugar. Sorta.

Re: Pretty.c

#34
post #32

> ifnt for if(!...). "unless" seems more readable than "ifnt".

Another bikeshed is the infinite for(;;) loop being called "always"

I've seen "loop" in other languages. But Qt calls it "forever", and that is indeed very pretty. Very Qt, even

Re: Pretty.c

#35

Reminds me of a C++ codebase I once had to inspect that was entirely written as if it were written in Java. With camelcase naming for everything, getters and setters for every class variable, interfaces everywhere.

You ain't seen nothin. Check out the bourne shell source code from unix seventh edition. https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd... I can't believe it's not ALGOL.

Re: Pretty.c

#36
This made me immediately think whether MIT Loop of Common Lisp was an inspiration here. Checked the user's profile and sure enough, a lisper!

Re: Pretty.c

#38
post #31

Meta: the naming is ... strange. The actual name of the repo is "pretty.c", but the name used for the language/dialect/result/horrorshow[*] is "Pretty C". The actual code file you include is called "pretty.h", which makes sense since it's a header, of course. Confusing! Edit: escapes. [*] Yes, I'm a C programmer, currently hunting for black-marked insulin to combat the rapid-onset diabetic attack from all that sugar.…

I mean, don’t say the repo didn’t warn you!

> The goals for Pretty C are: Provide so much syntactic sugar as to cause any C developer a diabetes-induced heart attack.

Re: Pretty.c

#39

Reminds me of a C++ codebase I once had to inspect that was entirely written as if it were written in Java. With camelcase naming for everything, getters and setters for every class variable, interfaces everywhere.

> camelcase naming for everything, getters and setters for every class variable, interfaces everywhere

This is not far off from the guidelines in many cases, e.g. Windows code (well, not every variable of course.) A lot of Java design was copied from C++.

Post reply on HN