{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreif6ckstyew2bzvct7dqyxpbrh6t7hatpol7k2ne2df63xnnhyuk7a",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mivljruasys2"
  },
  "path": "/t/bluefin-naming-handle-or-capability/13903#post_1",
  "publishedAt": "2026-04-07T09:23:31.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "IOE",
    "file handles",
    "the handle pattern",
    "capability-based security"
  ],
  "textContent": "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)?\n\n* * *\n\nMy 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 and pass it into your operation like this\n\n\n    -- Bluefin\n    fooBf :: e <: es => IOE e -> Eff es r\n\n\nThis contrasts with `effectful` and `mtl` style, where you would use a constraint:\n\n\n    -- effectful\n    fooEf :: IOE :> es => Eff es r\n\n    -- mtl\n    fooMt :: MonadIO m => m r\n\n\nOn the other hand, passing _state_ at the value level already has prior art in Haskell: `ST`:\n\n\n    -- ST\n    stateSt :: STRef Int s -> ST s r\n\n    -- Bluefin\n    stateBf :: e <: es => State Int e -> Eff es r\n\n\n    -- effectful\n    stateEf :: State Int :> es => Eff es r\n\n    -- mtl\n    stateMt :: MonadState Int m => m r\n\n\nSince 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” and in “the handle pattern”. 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”, but the concept itself is broader.\n\n* * *\n\nDoes 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.",
  "title": "Bluefin naming: \"handle\" or \"capability\"?"
}