James Clark
James Clark
This needs the clarification in #1182 to ensure that the Publisher can participate in graceful shutdown.
The rule should be something like this. If the match-stmt is exhaustive and can complete normally, then the narrowed types implied by the normal completion of the match-stmt is the...
I believe we can generalize this to any readonly type (i.e. any type that is a subtype of `readonly`). More precisely, an identifier can be used as a match pattern...
Probably need to restrict to case where either - type in pattern is simple type or string (inherently immutable basic type), or - type in match expressiob is readonly to...
This relates to #34: types like `string` should be treated more as predeclared identifiers rather than reserved words.
Might be better to call this `pipe`. On second thoughts, I think a better name is `channel`.
See https://github.com/ballerina-platform/ballerina-standard-library/issues/2821#issuecomment-1082528879 for a discussion of why shutdown is difficult. I think we want to approach this by seeing channels as the module-level counterpart of the worker message passing. Worker...
Something like: ``` channel string demoChannel; service /graphql on new graphql:Listener(4000) { resource function sub messages() returns stream { // referencing the channel in an expression context produces a value...
This ties into #736.
I suspect prohibiting public channels would be too restrictive. The challenge then is how to make things analyzable without this restriction.