Live data from Hacker News

Pretty.c

github.com

81–90 of 227 posts

Re: Pretty.c

#81

Does "strong typing" now just mean "static typing"? Afaik both lua and python are already strongly typed. Javascript is not and I have no clue about ruby.

> Does "strong typing" now just mean "static typing"?

The distinction strong and weak typing is irrelevant in practice.

Weak (but present) static typing beats strong dynamic typing every single time, because what is valuable is NOT "Do I see a type mismatch error only when a user accesses it?", it's "does this mismatch prevent a deployment?"

IOW, the only distinction in production is dynamic typing vs static typing, not strong typing vs weak typing.

Re: Pretty.c

#82

It claims to be a scripting language but you still have to compile the programs. Boo! Add CINT ( https://root.cern.ch/root/html534/guides/users-guide/CINT.ht... ) and you can have instantaneous execution and even a REPL!

Well, who said that scripting language cannot be compiled? And yeah, Clang-REPL is another way to make it REPL-friendly.

Re: Pretty.c

#83
post #32

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

Indeed! But I've reserved "unless" for a ternary conditional, which is more useful anyway.

Oh shit wait, you're John Tromp, BLC creator! I'm a fan!

Re: Pretty.c

#84
post #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

"forever" added in commit 67ff9ef, thank you!

Re: Pretty.c

#85

Earlier quoted context omitted.

> I've seen "loop" in other languages. But Qt calls it "forever", and that is indeed very pretty. Very Qt, even You can break a "forever" loop so I think "loop" is a better name.

I don’t know why “repeat” isn’t very common in place of while/loop/etc; it works out nicely grammatically. repeat {} repeat while {} repeat {} while repeat {}

Pretty C does aliases "repeat" for "do", so yeah, I've got you covered!

Re: Pretty.c

#86
post #34

Earlier quoted context omitted.

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

> I've seen "loop" in other languages. But Qt calls it "forever", and that is indeed very pretty. Very Qt, even You can break a "forever" loop so I think "loop" is a better name.

"loop" added in commit 626408b, thank you!

Re: Pretty.c

#87
post #59

Earlier quoted context omitted.

> I've seen "loop" in other languages. But Qt calls it "forever", and that is indeed very pretty. Very Qt, even You can break a "forever" loop so I think "loop" is a better name.

"indefinitely" might be a better name. (But I think loop is indeed a better name.)

Added in commit ef510ca!

Re: Pretty.c

#88
post #3

Is it possible to tangle the Readme into pretty.h? In other words, are the codeblocks in the orgfile exhaustive. I love the literate way you have explained your thought process in the readme.

Yes, code blocks in Org are executable, but I was aiming for simple embedding and zero build-time, thus conservative choice of separating README and the actual header.

Re: Pretty.c

#89
post #74
post #57

Can someone clarify whether this is intended as a joke or whether the author is actually confused? I mean, nothing about this makes sense: it's not "scripting"; it claims to introduce "strong typing" while it does nothing about typing; it introduces all kinds of operator aliases "modeled after Lua and Lisp" that are present in neither of these languages. But it's not an obvious parody either, so I'm genuinely not sur…

I mean he has to be serious, right: "Deprecate Lua, Python, JavaScript, Ruby and a dozen other languages, because Pretty C is the ultimate scripting language, but lightning-fast and strongly typed!!"

Author here. I don't see any problem with this

Re: Pretty.c

#90
post #23
post #7

Earlier quoted context omitted.

> Provide so much syntactic sugar as to cause any C developer a diabetes-induced heart attack. seems like its obvious to me that its a joke

It's a joke that I would happily use.

You're welcome!
Post reply on HN