logoalt Hacker News

CSDudetoday at 7:35 PM2 repliesview on HN

I wish if err != nil return err was just 1 token.

Joking aside, as much as Go's stdlib and tools do the heavy lifting here, Go's verbostiy and expressing simple things in lots of lines worked against me most of the time.


Replies

frollogastontoday at 8:25 PM

Heh, I checked https://platform.openai.com/tokenizer to see if they made it 1 token, it's not.

nomeltoday at 7:38 PM

I've had a really terrible time getting LLM to properly handle errors as return values. It seems that bubbling up errors, in a side channel, to a contextually relevant point in the code (exceptions) seems MUCH easier for LLM to reason about/implement properly.

Maybe my problem is I'm using a language with exceptions, so trying to go against the statistical grain, with return values, is just too much.

show 1 reply