Giter Club home page Giter Club logo

Comments (1)

js-choi avatar js-choi commented on July 30, 2024

Thanks for the read. I will see what I can do about isolating do-expression-using examples into their own subsections.

As for whether smart pipelines require do expressions, the answer is no, although they would be pretty nice. Pasting from tc39/proposal-pipeline-operator#100 (comment):

@js-choi Does your proposal require do expressions in order to fully function?

It does not, insofar that “fully” functioning here indicates a minimum baseline of usefulness for the developer. do expressions are a Very Nice To Have thing because they enable the embedding of if else statements, try catch finally statements, and switch statements: all frequently involved in the transformation of values. In addition, do acts as a way to create a “topic-context block”, something like Perl 6’s given block—within this block, statements may use the topic reference may be used as an abbreviation for the same value—such as the new Whatever() |> do { #.commonThing(123); ::rareAndComplexThing(321); } example from tc39/proposal-pipeline-operator#101 (comment)). I would expect do expressions to be used as pipeline bodies so frequently, I also introduced Additional Feature BP as a compatible abbreviation for them. But Additional Feature BP is strictly optional.

do expressions are immensely useful, but they are useful in the same sense that embedding them in any nested expression in general is useful. The rules of topic style in the Core Proposal do not specially treat do expressions. do expressions are not necessary to the smart-pipelines proposal; they are additive and orthogonal.

from proposal-smart-pipelines.

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.