Stream: beginners

Topic: The term "ability" is confusing


view this post on Zulip Sergio Vargas (Nov 20 2023 at 22:18):

Hello,

I've been curious about Roc for a while and I wanted to share an observation about my first wrong impression about abilities in Roc. (I promise this isn't about typeclasses).

The first time I read about abilities I thought it was about of capability-based programming, i.e., a kind of effect system. Other languages, like Unison, use that exact term. After reading a little bit a realized it was something unrelated (but that Roc did have managed effects :cool: ).

I thought this was just a personal mistake, but today on the HN thread I read:

Yes, Koka is evidently a inspiration for Roc, which uses Perceus, in-place mutation and their effect system is called "abilities". Roc aims to be something like the "practical version" of Koka('s ideas).

Clearly, I'm not the only one making this mistake.

I understand that Roc chose not to call them typeclasses because they're not meant to be an all encompassing ontological soup of algebra, but I'd like to know why it didn't choose a more "traditional" term like interface or protocol.

Anyways, regardless term Roc chooses, it'd be nice if the reasoning for it was explained somewhere in the docs, since this is confusing to n > 1 people.

view this post on Zulip Richard Feldman (Nov 20 2023 at 23:23):

thanks for sharing!

the original proposal for the design mentions the naming choice briefly under "Avoiding the Classification Trap"


Last updated: Jul 06 2025 at 12:14 UTC