#Dang: adding `with`?

1 messages · Page 1 of 1 (latest)

steep anchor
#

That's a fun one, I'll think on it! Historically I've avoided adding methods on general object types to avoid colliding with APIs, and as a matter of fact I've recently added a Query.with API (part of modules v2) - so this might need a first-class language feature or something instead

rare epoch
#

I think with proper interfaces coming up, we can have a first-class interface for "installers", eg

interface Installer {
  install(c: Container): Container!
}

That would advantageously replace callbacks IMO. The blocker was just that interfaces not being really usable.

sleek dawn
#

What's going to change with interfaces?

steep anchor
#

Essentially, they'll become "real" interfaces at the GraphQL layer (and in the Go SDK), and core APIs will be able to define + consume them. It's mostly a large internal refactor (but also across all SDKs) to make them feel more first-class and finished