Unofficial Hacker News client - receive Push Notifications on replies.

Roc version 0.1.0, eight years in the making (opens external site)

468 points by DrDeadCrash 21 hours ago | rtfeldman.com | 129 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (2)

  1. 1. Do LLMs write it well?

    2. What are the suggested substitutes for OOP idioms like interfaces?

    Replies (1)
    1. > Do LLMs write it well?

      Yes. Most if not all the examples in the community section of the post are LLM authored. A large part of the reason is because there's been breaking changes most weeks for months. This comes with the territory for a pre-0.1 language and the Roc team says they've put in all the breaking changes they had on the roadmap so hopefully with the increased stability of a numbered release we'll see more non-LLM projects.

      The only thing I've particularly needed to kick the LLM on is error handling idioms. It reaches for `match` when something shorter would suffice.

      > What are the suggested substitutes for OOP idioms like interfaces?

      This is beyond the scope of a comment post but interfaces play an outsized role in most OOP system designs due to the need to nominally type everything in hierarchies. The closest mechanism would be using a `where` clause[1].

      [1] https://roc-lang.org/docs/main/langref/static-dispatch/#wher...