babel / proposals

✍️ Tracking the status of Babel's implementation of TC39 proposals (may be out of date)
https://github.com/tc39/proposals
433 stars 39 forks source link

Sept 2017 #28

Open hzoo opened 7 years ago

hzoo commented 7 years ago

Bocoup, Boston, MA (Sept 26-28) https://github.com/tc39/agendas/blob/master/2017/09.md

Checkbox means we completed it (some Stage 1 we may want to wait to start given instability of the proposal) https://tc39.github.io/process-document/ for a primer what each Stage means

New Proposals

Moving Foward

Needs Consensus (Stage 4)

Needs Spec Work

Other (Builtins, etc)

jridgewell commented 7 years ago

Pipeline operator to Stage 1: https://github.com/tc39/proposal-pipeline-operator

a |> b |> c

// - - -
c(b(a))

https://twitter.com/left_pad/status/912704437893976066

hzoo commented 7 years ago

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
mathiasbynens commented 7 years ago
jridgewell commented 7 years ago

@mathiasbynens: I don't think there's anything for us to implement with those. 😉

mathiasbynens commented 7 years ago

@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.

hzoo commented 7 years ago

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)

jridgewell commented 7 years ago

What I mean is the Intl changes are purely runtime. We'd need to implement the parsing and syntax for literals and pipeline.

jridgewell commented 7 years ago

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]();
michaelficarra commented 7 years ago

@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.

hzoo commented 7 years ago

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?

hzoo commented 7 years ago

export-ns-from: export * as ns from 'mod' - https://github.com/babel/proposals/issues/16

to Stage 4 (needs consensus)

jridgewell commented 7 years ago

Subsume JSON to stage 1:

http://babeljs.io/repl#?babili=false&browsers=ie%2010&build=&builtIns=true&code_lz=ESCgJgoZEoCYg&debug=false&circleciRepo=&evaluate=true&lineWrap=true&presets=es2015-loose%2Creact%2Cstage-3&prettier=false&targets=&version=7.0.0-alpha.19

jridgewell commented 7 years ago

Throw expressions to stage 2: https://github.com/tc39/proposal-throw-expressions


a || throw new Error('test');
jridgewell commented 7 years ago

Optional Chaining remains at Stage 1 😢.

Still need to update to remove super?.prop and a?.b = 1.

jridgewell commented 7 years ago

Private methods and accessors to stage 3: https://github.com/tc39/proposal-private-methods Note: static privates footgun

https://twitter.com/littledan/status/913224214760566784

hzoo commented 7 years ago

Nullary Coalescing from Stage 0 to Stage 1 https://github.com/babel/proposals/issues/14

a ?? b

// concerns about cross-cutting concerns with ?. syntax

jridgewell commented 7 years ago

Partial application to Stage 1: https://github.com/rbuckton/proposal-partial-application

michaelficarra commented 7 years ago

@jridgewell With strong objections to the syntax that is currently associated with the proposal.

ljharb commented 7 years ago

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.

hzoo commented 7 years ago

import.meta to Stage 3

littledan commented 7 years ago

Note that extensible numeric literals had significant objections to syntax and semantics as well.

mgtitimoli commented 7 years ago

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.

hzoo commented 7 years ago

You can check the individual issues @mgtitimoli https://github.com/babel/proposals/issues/32 - and the notes will be posted in a few weeks

brettz9 commented 6 years ago

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 .