logoalt Hacker News

cookiengineerlast Sunday at 7:59 PM2 repliesview on HN

If functions don't have a return signature, does that mean everything must be satisfied in the compilation step?

What about memory management/ownership? This would imply that everything must be copy by value in each function callsite, right? How to use references/pointers? Are they supported?

I like the matchers which look similar to Rust, but I dislike the error handling because it is neither implicit, and neither explicit, and therefore will be painful to debug in larger codebases I'd imagine.

Do you know about Koka? I don't like its syntax choices much but I think that an effect based error type system might integrate nicely with your design choices, especially with matchers as consumers.

[1] https://koka-lang.github.io/koka/doc/index.html


Replies

driggslast Sunday at 10:08 PM

> If functions don't have a return signature, does that mean everything must be satisfied in the compilation step?

Functions do have a return signature.

It looks like the author chose to show off the feature of return type inference in the short example README code, rather than the explicit case.

https://github.com/Beariish/bolt/blob/main/doc/Bolt%20Progra...

zygentomalast Sunday at 9:22 PM

Oh, not OP, but I love Koka. I should play around with it again thanks for reminding me!