Comments (1)
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 ofif
else
statements,try
catch
finally
statements, andswitch
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 thenew Whatever() |> do { #.commonThing(123); ::rareAndComplexThing(321); }
example from tc39/proposal-pipeline-operator#101 (comment)). I would expectdo
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 treatdo
expressions.do
expressions are not necessary to the smart-pipelines proposal; they are additive and orthogonal.
from proposal-smart-pipelines.
Related Issues (20)
- Explainer: Explain difference between `|>` expression and `with` statement
- Spec: Specify Feature NP (N-ary Pipelines) HOT 4
- Spec: Specify Feature BP (Block Pipelines) HOT 2
- Spec: Specify Feature TS (`try` statements)
- Readme/Spec: Drop Feature FS (`for` statements) HOT 3
- Spec, Feature PF: Specify async pipeline functions
- Feature PP (pipelines with implicit head) seems weakly motivated HOT 5
- Spec: PipelineStep must cover ConditionalExpression with supplemental production
- Spec: Cross-reference all augmented sections
- How would this interop with stateful closures? HOT 2
- Readme: Separate additional features, goals, nomenclature, term rewriting, and relations to other proposals and languages HOT 1
- Readme: Separate goals into new document HOT 1
- Spec: Remove redundant rules for chain productions
- Why was `#` chosen as the topic reference? HOT 8
- Explainer: Add example from real code using RxJS and/or Observables
- Draft a version that uses braces to distinguish pipe styles HOT 5
- Feature: Pipeline transforms HOT 2
- Full bare style option HOT 1
- [doc bug]: 'do expression' reference links refer only to ./relations.md#do-expressions && doubled 'do expression'-block HOT 1
- Exaggeration under With No Pipelines HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proposal-smart-pipelines.