News for hackers. Stuff that matters.
Re:I've been designing a language since 2009 – friends and I... by Supermancho on Monday August 15, 2022 @07:26PM (#32476956)
> Is the `try` keyword in the highlight section what you're looking for?

I worded it poorly.

> Allow for Error short circuits

I was trying to say that I liked the feature as-is, because it Allows for Error short circuits. There are a lot of common patterns that modern languages avoid idiomatically, despite their widespread use in roundabout ways.

Re:I've been designing a language since 2009 – friends and I... by levodelellis on Tuesday August 16, 2022 @10:43AM (#32483401)
I'm not good with this site. Do most people have some kind of notification when someone replies to them?

Is the problem with short circuits that you can ignore the error? It's not documented yet but `error return` requires the function to be an error type so the error can propagate. If thats not good enough do you have some insight on how to fix it? What's worse and was designed intentionally by me is `fn() error { return }` not requiring the function to have an error return (although this would be a void return type). I make the assumption if you have a block (instead of `error return`) you're handling the error. You can also propagate by doing something like this `nonErrVal = fn() error { print("write a better error log"); return error }`.