Live data from Hacker News

Tell HN: C Experts Panel – Ask us anything about C

news.ycombinator.com

11–20 of 978 posts

Re: Tell HN: C Experts Panel – Ask us anything about C

#12

So what do people think about having a feature in the C language akin to the defer statement in GoLang? The GoLang defer statement defers the execution of a function until the surrounding function returns. The deferred call's arguments are evaluated immediately, but the function call is not executed until the surrounding function returns. It looks like an interesting mechanism for cleaning up resources.

[deleted]

Re: Tell HN: C Experts Panel – Ask us anything about C

#13
post #9

I've been waiting for a book on C from No Starch Press, so I'm really excited for this one. This might not be too deep a question on the C language in regards to this book, but I've been wondering, why did you decide to have an eldritch horror as the book's cover?

It's a longish story, but people do seem to like the cover. We started equating the idea of C == Sea, so we had some early drawings of the robot riding various undersea creatures including a giant squid. I thought that looked overly phallic, so I suggested the robot ride Cthulhu instead, an unofficial mascot of NCC Group.

I like how Cthulhu is shown as kind of a guide for the robot.

The C==Sea brings to mind the book Expert C Programming: Deep C Secrets.

Re: Tell HN: C Experts Panel – Ask us anything about C

#14
post #7
post #5

Some simple instructions about how to use a thread for conversation would be appreciated. Thanks!

Nothing to it! Just hit the reply button on comments you want to respond to. You can also upvote anything you like by clicking on the up arrow to the left of the comment.

Okay, is there a starting thread for today's C Experts panel? I miss the old net newsgroups.

Re: Tell HN: C Experts Panel – Ask us anything about C

#16
post #9

Earlier quoted context omitted.

It's a longish story, but people do seem to like the cover. We started equating the idea of C == Sea, so we had some early drawings of the robot riding various undersea creatures including a giant squid. I thought that looked overly phallic, so I suggested the robot ride Cthulhu instead, an unofficial mascot of NCC Group.

I like how Cthulhu is shown as kind of a guide for the robot. The C==Sea brings to mind the book Expert C Programming: Deep C Secrets.

Deep c secrets, a classic.

Re: Tell HN: C Experts Panel – Ask us anything about C

#17

So what do people think about having a feature in the C language akin to the defer statement in GoLang? The GoLang defer statement defers the execution of a function until the surrounding function returns. The deferred call's arguments are evaluated immediately, but the function call is not executed until the surrounding function returns. It looks like an interesting mechanism for cleaning up resources.

It could be very useful for cleaning resources. I've never used GoLang, but can see how that could be useful in various circumstances. As we're talking about C, I suspect a feature like that, with the potential to make things safer, would also enable the unwary to shoot themselves in the foot more easily.

Re: Tell HN: C Experts Panel – Ask us anything about C

#18
post #7

Earlier quoted context omitted.

Nothing to it! Just hit the reply button on comments you want to respond to. You can also upvote anything you like by clicking on the up arrow to the left of the comment.

Okay, is there a starting thread for today's C Experts panel? I miss the old net newsgroups.

The thread is https://news.ycombinator.com/item?id=22865357, which is the page you've been posting to. It's now listed on the front page of the forum, https://news.ycombinator.com/, which is a list of the stories people have upvoted today.

You're not the only person who misses the old newsgroups! The format that Hacker News uses is one that became sort of standard on the web in the early 2000s. It works differently than usenet did, but you get threaded comments in the sense that replies are nested under the posts they're replying to.

Re: Tell HN: C Experts Panel – Ask us anything about C

#19

How and why will C combat Rust?

In my opinion, the two languages are going to co-exist for a long time. C has billions of lines of legacy software written in it… In recent news, COBOL developers were sought after in order to update existing COBOL software, so the same thing will happen with C, perhaps to the end of humanity (I have become pessimistic as to humanity's future).

There are pieces of software that should be given priority for a rewrite in Rust, but most of C software is never going to be rewritten, because there is simply too much of it.

Therefore, even if C did not have any advantage of its own over Rust, there would still be legacy software to maintain and to extend.

The advantages of C include that sometimes, an embedded processor with a proprietary instruction set is provided by the chipmaker with its own C compiler, which is the only compiler supporting the instruction set; that C is still currently used to write the runtimes of higher-level languages (I'm familiar with OCaml, but it isn't too much of a stretch to imagine that the runtimes of Python, Haskell,… are also written in C).

Post reply on HN