# Bluefin naming: "handle" or "capability"?

**URL:** <https://discourse.haskell.org/t/bluefin-naming-handle-or-capability/13903>\
**Category:** Uncategorized\
**Created:** [April 7, 2026, 9:23am UTC](https://discourse.haskell.org/t/bluefin-naming-handle-or-capability/13903 "2026-04-07T09:23:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomjaguarpaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tomjaguarpaw/32/1230_2.png) [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Post date:** [April 7, 2026, 9:23am UTC](https://discourse.haskell.org/t/bluefin-naming-handle-or-capability/13903/1 "2026-04-07T09:23:31Z")

</div>

Bluefin represents effects at the value level. Should I call these value level parameters “handles” (their current name) or “capabilities” (a name for a similar concept used elsewhere in programming laguage design)?

* * *

My effect system Bluefin works by passing the ability to perform effects at the value level rather than at the type level (via constraints) which is the more common pattern. For example, to run `IO` actions in a Bluefin operation you use [`IOE`](https://hackage-content.haskell.org/package/bluefin-0.5.1.0/docs/Bluefin-IO.html#t:IOE) and pass it into your operation like this

```haskell
-- Bluefin
fooBf :: e <: es => IOE e -> Eff es r

```

This contrasts with `effectful` and `mtl` style, where you would use a constraint:

```haskell
-- effectful
fooEf :: IOE :> es => Eff es r

-- mtl
fooMt :: MonadIO m => m r

```

On the other hand, passing _state_ at the value level already has prior art in Haskell: `ST`:

```haskell
-- ST
stateSt :: STRef Int s -> ST s r

-- Bluefin
stateBf :: e <: es => State Int e -> Eff es r

-- effectful
stateEf :: State Int :> es => Eff es r

-- mtl
stateMt :: MonadState Int m => m r

```

Since the concept of passing these things at value level is essential to Bluefin I’d like to use the clearest name. Currently I call them handles because that is the name used for “[file handles](https://hackage-content.haskell.org/package/base-4.22.0.0/docs/System-IO.html#t:Handle)” and in “[the handle pattern](https://jaspervdj.be/posts/2018-03-08-handle-pattern.html)”. But that name is pretty generic and perhaps it doesn’t communicate precisely enough. There is another name for this concept, “capability”. I believe it is _generally_ used in a security context, as in “[capability-based security](https://en.wikipedia.org/wiki/Capability-based_security)”, but the concept itself is broader.

* * *

Does anyone have any opinions on whether “handle” or “capability” communicates this concept more clearly? If “capability” has strong support then I’ll change the nomenclature in Bluefin.

---

<div class="post-metadata">

**Author:** ![tobz619](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tobz619/32/3125_2.png) [@tobz619](https://discourse.haskell.org/u/tobz619)\
**Post date:** [April 7, 2026, 10:27am UTC](https://discourse.haskell.org/t/bluefin-naming-handle-or-capability/13903/2 "2026-04-07T10:27:43Z")

</div>

I quite like capability when referring to the effect system members and handles when talking about the what the function requires to provide the effect.

Reading the type signature for `fooBf`, I read it as:

"`fooBf` is a computation in which _capability_ `e` is a member of the _capabilities_ `es` and it takes a _handle_ to an `IOE` effects over _capability_ `e` which it will use to produce an `Eff`ect and a return value from the `es` effect sytem of type `r`.”

EDIT: `IOE e` and `fooBF` does not _use_ other effects in `es`. The effect is locked to whatever `IOE` effects `e` can effect in `es`.

---

<div class="post-metadata">

**Author:** ![simonpj](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/simonpj/32/890_2.png) [@simonpj](https://discourse.haskell.org/u/simonpj)\
**Post date:** [April 7, 2026, 1:51pm UTC](https://discourse.haskell.org/t/bluefin-naming-handle-or-capability/13903/3 "2026-04-07T13:51:51Z")

</div>

“capability” conveys the right idea to me. It’s less generic.

Simon

---

<div class="post-metadata">

**Author:** ![wiz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/wiz/32/2408_2.png) [@wiz](https://discourse.haskell.org/u/wiz)\
**Post date:** [April 7, 2026, 3:09pm UTC](https://discourse.haskell.org/t/bluefin-naming-handle-or-capability/13903/4 "2026-04-07T15:09:57Z")

</div>

I like “capabilities”. But I come from infosec and may be biased 😄

---

<div class="post-metadata">

**Author:** ![michaelpj](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/michaelpj/32/417_2.png) [@michaelpj](https://discourse.haskell.org/u/michaelpj)\
**Post date:** [April 7, 2026, 7:36pm UTC](https://discourse.haskell.org/t/bluefin-naming-handle-or-capability/13903/5 "2026-04-07T19:36:08Z")

</div>

To me “capability” somehow suggests singleton-ness. Whereas “handle” suggests that I could have several similar handles to different things. It seems more natural to me to say “I have two `State` handles in scope” versus “I have two `State` capabilities in scope”.

---

<div class="post-metadata">

**Author:** ![tomjaguarpaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tomjaguarpaw/32/1230_2.png) [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Post date:** [May 9, 2026, 8:37am UTC](https://discourse.haskell.org/t/bluefin-naming-handle-or-capability/13903/6 "2026-05-09T08:37:19Z")

</div>

In the end I chose “capability”. At some point I hope to write an article explaining my rationale.

---

<div class="post-metadata">

**Author:** ![tomjaguarpaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tomjaguarpaw/32/1230_2.png) [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Post date:** [September 1, 2026, 7:30am UTC](https://discourse.haskell.org/t/bluefin-naming-handle-or-capability/13903/7 "2026-09-01T07:30:12Z")

</div>

Here’s the article in question: [Bluefin is a capability system](https://discourse.haskell.org/t/bluefin-is-a-capability-system/14632/1)
