GithubHelp home page GithubHelp logo

Clarify termination scope about infra HOT 4 OPEN

chaals avatar chaals commented on June 24, 2024
Clarify termination scope

from infra.

Comments (4)

chaals avatar chaals commented on June 24, 2024

(It might just be me and it's definitely in the realm of "bikeshedding", but I generally prefer the word "terminate" as it feels slightly less charged in contemporary usage).

from infra.

marcoscaceres avatar marcoscaceres commented on June 24, 2024

Personally, I don't think this is an infra issue (Infra is more of a "standard library" for specs, providing handy primitives like lists, maps. etc.).

It's more of a "how to write a spec" issue. We should eventually write a guide on best practices for spec writing.

from infra.

chaals avatar chaals commented on June 24, 2024

As long as infra describes things to use in algorithms, I think this belongs there. After all, people are copying the style and usage across multiple specifications, and the point of infra is to help them do that appropriately. Relying on algorithms as a definitive normative explanation, when they are expressed in an undocumented format that allows for ambiguities, can have the effect of "hiding" those ambiguities behind an appearance of rigour.

(I appreciate having algorithms, but I hope a best practices guide will include "explain what happens in prose even if it's non-normative, instead of assuming that the algorithms are self-explanatory". )

from infra.

annevk avatar annevk commented on June 24, 2024

I agree that it would be good to clarify this.

Algorithms are either introduced as an algorithm or as "these steps". Algorithms sometimes end up being nested, e.g., if you want to run something "in parallel" to the current algorithm you end up creating a nested algorithm. This also applies to callback-like algorithms that are somewhat common with fetch.

Return and throw are scoped to a single algorithm. "Abort these steps" is also scoped to a single algorithm, but not currently defined. It is typically in use with "in parallel" algorithms because those cannot really return anything. They have to queue a task (perform IPC) to get data back to the other thread.

"Abort when" is a very specific construct with no relation to "abort these steps".

So thoughts based on that:

  • HTML defines "in parallel". It probably ought to define "abort these steps" and maybe we should try to exclusively use it for these top-level "in parallel" algorithms? (If we want to use it more broadly Infra should probably define it as a synonym for return without argument.)
  • Infra could maybe do a better job at defining an algorithm. E.g., defining "block scope" itself rather than referring to Wikipedia. This might be rather tricky to do though.

from infra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.