[compute-pressure] single value enum and API pattern (#304)

dontcallmedom has just created a new issue for https://github.com/w3c/compute-pressure:

== single value enum and API pattern ==
Following https://github.com/w3c/compute-pressure/pull/300 the `PressureSource` enum has a single value; I understand the goal is to keep `thermals` as a possible future extension, but conversely, it would be unfortunate if such a future extension never sees the light and developers have to keep using `observe("cpu")`  for ever for no good reason.

I wonder if this points toward a possible alternative structure for the API, where `observe()` would be applied to an object representing the source (e.g. `cpu.observe()`).



Please view or discuss this issue at https://github.com/w3c/compute-pressure/issues/304 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 27 November 2024 10:12:03 UTC