Hacker News new | ask | show | jobs
by djmips 585 days ago
Is this largely supplanted by LLMs?
3 comments

The difference is I trust this website, and wouldn't trust an LLM.
LLMs are mostly correct with regards to this stuff.

cdecl is always correct with regards to this stuff.

I don't know why you'd choose the former.

Because if you don't do things exactly the way cdecl wants you get a Syntax Error
Wouldn't any explanation given, apart from syntax error, be wrong in the case you provide it with an invalid syntax?
I was thinking of the issue of going from English to C. Even when you out in malformed C it's nice to get either a compiler error which explains the problem, or even better an LLM that can suggest how to fix it.
Probably.

Output for the example I got on opening the website:

  char (*(*x())[5])()
cdecl.org: declare x as function returning pointer to array 5 of pointer to function returning char

ChatGPT: x is a function that, when called, gives us access to 5 functions that each return a character. (TL;DR, it gave a full explanation too)

Like mentioned before the error rate of LLMs is probably much higher on complex expressions.