Open hzoo opened 7 years ago
Pipeline operator to Stage 1: https://github.com/tc39/proposal-pipeline-operator
a |> b |> c
// - - -
c(b(a))
Extensible literals to Stage 1: https://github.com/littledan/proposal-extensible-numeric-literals
1236536253453n BigInt (special case)
4525i Imaginary numbers
235435.461m IEEE 754-2008 64-bit decimal
300px CSS Typed OM
Intl.NumberFormat.prototype.formatToParts
to Stage 4Intl.Segmenter
to Stage 3@mathiasbynens: I don't think there's anything for us to implement with those. 😉
@jridgewell Given the feedback during the meeting, I’d say the same goes for the extensible literals proposal and (to a lesser extent) the pipeline operator.
Could at least get the syntax in for pipeline, would be interesting trying to do multiple transforms via options (and could test in the REPL for people, assuming we get those options in)
What I mean is the Intl
changes are purely runtime. We'd need to implement the parsing and syntax for literals and pipeline.
First Class Protocols to stage 1: https://github.com/michaelficarra/proposal-first-class-protocols
protocol ProtocolName {
// declare a symbol which must be implemented
thisMustBeImplemented;
// and some methods that you get for free by implementing this protocol
youGetThisMethodForFree(...parameters) {
methodBody;
}
}
class ClassName implements ProtocolName {
[ProtocolName.thisMustBeImplemented]() {
// this is the implementation for this class
}
}
let instance = new ClassName;
instance[ProtocolName.youGetThisMethodForFree]();
@jridgewell Sweet.js implementation with pretty comprehensive test suite located here: https://github.com/disnet/sweet-interfaces
Polyfill implementing the Protocol
constructor here: https://github.com/michaelficarra/proposal-first-class-protocols-polyfill. It's correct, but will only work in newer engines and sticks itself on the global for you. PRs to make it good would be very welcome.
https://github.com/tc39/ecma262/pull/984
Early errors for RegExp literals: /a{5,3}/
, /[z-a]/
Would this have been covered with test262 tests anyway?
export-ns-from: export * as ns from 'mod'
- https://github.com/babel/proposals/issues/16
to Stage 4 (needs consensus)
Throw expressions to stage 2: https://github.com/tc39/proposal-throw-expressions
a || throw new Error('test');
Optional Chaining remains at Stage 1 😢.
Still need to update to remove super?.prop
and a?.b = 1
.
Private methods and accessors to stage 3: https://github.com/tc39/proposal-private-methods Note: static privates footgun
Nullary Coalescing from Stage 0 to Stage 1 https://github.com/babel/proposals/issues/14
a ?? b
// concerns about cross-cutting concerns with ?.
syntax
Partial application to Stage 1: https://github.com/rbuckton/proposal-partial-application
@jridgewell With strong objections to the syntax that is currently associated with the proposal.
For partial application, please note that there is a not-insignificant number of members that believe that the proposal will not be able to be made viable.
import.meta to Stage 3
Note that extensible numeric literals had significant objections to syntax and semantics as well.
Hi everyone, could you please elaborate a bit more what is happening with partial application proposal?
I would love to see it moving forward but based on your comments, I guess it is not gonna be an easy process.
Thanks.
You can check the individual issues @mgtitimoli https://github.com/babel/proposals/issues/32 - and the notes will be posted in a few weeks
Array.prototype.flatten
has been changed to Array.prototype.flat
per https://github.com/tc39/proposal-flatMap and is now a stage 3 per https://github.com/tc39/proposals .
New Proposals
::a
)Moving Foward
import.meta
from Stage 2 to Stage 3Needs Consensus (Stage 4)
Needs Spec Work
?.
and use of?.[
and?.(
in general,?.
syntax is desired but may not align with?.[
and?.(
but?&.
and other syntax changes are not preferred)Builtins.typeOf()
andBuiltins.is()
stays at Stage 0Other (Builtins, etc)
Intl.NumberFormat.prototype.formatToParts
to Stage 4Intl.Segmenter
to Stage 3Intl.RelativeTimeFormat
to Stage 3Atomics.waitAsync
to Stage 2Intl.PluralRules
to Stage 4Array.prototype.flatMap
andArray.prototype.flatten
from Stage 1 to Stage 2Intl.Locale
to Stage 1String.prototype.matchAll
to Stage 2