tc39 / proposals Goto Github PK
View Code? Open in Web Editor NEWTracking ECMAScript Proposals
Home Page: https://tc39.github.io/process-document/
Tracking ECMAScript Proposals
Home Page: https://tc39.github.io/process-document/
Although not explicitly stated, it seems like there's an implicit distinction between active stage 0 proposals and inactive ones, where only active ones are in the "Stage 0" list.
The ArrayBuffer.transfer
proposal seems to be a sole exception to this, however. Was this intentional, or just a mistake?
Hello all,
Very embarrassing, my English is not awesome, so.........
See https://github.com/achun/proposal-static-type-constraints-features
Not an issue but is it possible to know the current status of the block params proposal? It hasn’t been updated for over a year now and I received no answers from the person in charge (@samuelgoto) when I asked for more information.
Thanks
I'm not sure where this issue should be, but:
tc39/proposals/stage-0-proposals.md
.Some of these documents should be fixed, and I'm not sure which ones.
Any chance you could publish the June meeting notes on the repo?
On the README.md:
Intl.DurationFormat
says June 2020
but the link points to the February notes.Intl.Enumeration API
and Smart Unit Preferences in Intl.NumberFormat
reached stage 1 in June 2020 but they're no link to the notesI have a proposal as forEach function of array should return a promise of void. As the function is async, while coupling it with asynchronous "behavior" and yield is not working.
Is it possible to revert the custom theme, so issues in all proposals look and behave like default Github ?
I really down't know this submission proposal thing.
I have troubles with Monanding javascript and strategies choosing.
simple
if(symbol constructorof class) would save hours of work.
Thank you for implementation.
Unable to find details of the below:
64-Bit Integer Operations.
Null Propagation Operator got renamed to Optional Chaining?
The minus sign, −
(U+2212) is not correctly recognized in JavaScript as minus:
10 − 4
// Yields: SyntaxError: illegal character
10 - 4
// Yields: 6
Is this an issue? Depends. Technically? No, −
is not in the standard keyboard layout, oddly. The issue comes to screen readers, i.e. readers used by blind or visually impaired programmers that code. Screen readers will read the normal -
in -1000
as: "Dash thousand", but if −
is used, the screen reader will read: "Minus thousand".
Another example is:
1000 − 100
// Screen reader: "Thousand minus hundred"
1000 - 100
// Screen reader: "Thousand dash hundred"
I think I need some more detail to back this up, but this is at my thoughts on this subject.
I am a fan of correctness and I would like to see JavaScript recognizing the correct symbols :)
Wierd behaviors,
1)
const x = {...a, key:true}
Throws error ‘a’ is undefined, but
let a //not assigned, which is undefined now
const x = {...a, key: true}
Doesn’t throw error even when typeof a is undefined
Same goes with this scenario,
If we declare variable as undefined,
let a = undefined
And concatenate with other string,
let x = a + ‘test’ // outputs ‘undefinedtest’
Why is data type is getting concatenated?
function add(x, y) {
// ...
}
add();
The following code throws no error and assigns undefined
to x
and y
in the body of the call. I am proposing using !
on the right to show parameters that are required. This would also apply for class
methods and constructors. And can be mixed with existing function declarations for allowing optional parameters that may or may not have default values
Example
function fetch(url!, headers) {
// ...
}
It could be nice to have precommit hooks for md formatting to prevent noise in PR diffs. husky + prettier should fit well. WDYT?
Not sure if this is place to discuss about this.
In esdiscuss.org, it says to send message to specific email, when I posted, I haven't received any replies, or anything and I checked esdiscuss.org and my post doesn't exist there.
I'm not sure how useful the "rocket" column is. It doesn't seem to be very up-to-date. Generally, the agendas are a more frequently updated data source for what's proposed for advancement. Should we remove this column?
As applications are moving to the cloud more file formats require zipping and unzipping to conserve space (e.g. Excel).
There are a couple of Zip implementations but they are all a bit awkward ones. JSZip has bugs. zip.js is unsupported. Sometimes they hang on big archives, etc.
Not to mention they are about 100 KB in size (e.g. jszip.min.js).
Perhaps it would make sense for browsers to add native Zip
class.
And also file streaming could be a thing for handling large files.
const unzip = new Zip.Decompress()
unzip.on('entry', entry => ...)
file.createReadableStream().pipe(unzip)
const zip = new Zip.Compress()
const file = File.initiateOutputStream('file.zip')
if (!file) return
zip.pipe(file)
zip.push('entry1', Blob|String)
zip.close()
Reopen if needed.
At Stage 0 proposals page link that is provided for Relationships - http://wiki.ecmascript.org/doku.php?id=strawman:relationships - can't be loaded
This may or may not be the right place to open this issue. In addition, this is more of a list of questions than it is a definitive issue against one of more proposals or proposal definitions.
Class Fields has provisions for privatizing fields within classes. It is unclear to me based on reading the proposal whether the ability to privatize a field with a "#" extends to methods. Nevertheless, the link to Defensible Classes is broken and has been for some time. What provisions would defensible classes provide that Class Fields would not with the exception of perhaps privatizing methods. Perhaps preventing the definition/redefinition of the class and it's methods/members?
In addition, they're certainly not expressly mutually exclusive, but I cannot see the value provided by the duplicity of a proposal for nested import statements and for a functional import. Doesn't the progression of import()
to stage 3 imply that the TC believes that it is objectively better than the alternative? Does this not somewhat invalidate the nested import proposal?
Hi! I'm just someone who wants to know a bit more about the process, and hopefully this will be useful if someone else stumbles on to this.
Could someone explain what a finished proposal implies? Taking dynamic imports for example (just moved to finished_proposals.md in #217), I believe an implementation has already landed in most browsers and nodejs under the --experimental-modules
flag. Were these implementations updated alongside this proposal document? Does this proposal being finished mean that there will be no more modifications to the spec in any of the implementations? Does it indicate that these features will be marked stable in nodejs soon?
I'm not sure where to suggest it, so I'll write it here
How about if we provide a Tool like Trello in which we list the Proposals in the respective Stage and then the community can vote on what features they want mostly
For example, you could see which proposals are well received by the community and where priority could be given
If there is already a place for it, can you link it here please?
Intl.MessageFormat sometimes appears in agendas but is missing from ECMA402 proposals list. What stage is it?
I have been working on a project where we had a serious serious need of deep copy.
The work out that me and my mentor did was this
https://codepen.io/IamManchanda/pen/XYpVPY?editors=0012
But here is the catch,
How I did it doesn't matter but what matters is that I have felt that everyone who is working on a complex app with frameworks like angular, vue and react would need such function
Reason why I think so strongly that everyone in javascript community needs this is this
=> https://gist.github.com/search?l=JavaScript&q=deepcopy
=> https://gist.github.com/search?l=JavaScript&q=deepclone
=> https://github.com/search?l=JavaScript&q=deepcopy&type=Repositories
=> https://github.com/search?l=JavaScript&q=deepclone&type=Repositories
And thus I decided to post this on lodash lodash/lodash#3822
But here is what the author felt about it
Thanks for the suggestion. I'm happy to defer to user-land packages for this. My hope is that a built-in deep clone comes to browsers and Node (based on the structured cloning algorithm) then there would be no need for user-land implementations.
I think he is right ... I personally feel like a good way to do this would be to add a built-in deepCopy Prototype for both objects and iterable objects
That being said, if you guys think that good place would be Global Built-in's then that's great too
Anyways my case implementation could be like
const harry = {
name: 'Harry Manchanda',
age: 25,
social: [
{
website: 'twitter',
username: '@harmanmanchanda',
},
{
website: 'facebook',
username: 'IamManchanda',
},
],
};
// Object.prototype.deepCopy(), Array.prototype.deepCopy(), etc
const dev = harry.deepCopy();
dev.social[1].website = 'github';
console.log(harry);
console.log(dev);
which will output ...
Concrete problem: Looking at https://github.com/tc39/proposal-trailing-function-commas, I can’t tell it’s in the “finished” state. Same for https://github.com/tc39/Array.prototype.includes. Etc.
I realize https://github.com/tc39/proposals/blob/master/finished-proposals.md can tell me — and https://github.com/tc39/proposals/blob/master/inactive-proposals.md for inactive ones — if I’m somebody who happens to already know to look there. But I’m sure many people don’t know that.
That risks causing confusion and wasting peoples’ time trying to figure out what the state is.
So it’d be helpful if something like this could happen:
When https://github.com/tc39/proposals/blob/master/finished-proposals.md is updated to include a proposal that’s reached the “finished” state, the editor or somebody takes responsibility for adding text to the proposal document itself — in its own repo — to mark it as finished.
When https://github.com/tc39/proposals/blob/master/inactive-proposals.md is updated to include a proposal that’s been put into the “inactive” state, the editor or somebody takes responsibility for adding text to the proposal document itself — in its own repo — to mark it as inactive.
It’d also be helpful of the group could consider adopting and documenting a policy that requires the above actions to happen.
Given the massive works that have been done to improve and enhance the language, it's time to give timezone and date-time logic an updated approach. I'm not sure where to even start with this, but I was thinking it might be nice to get something similar to moment.js
+ moment-timezone
inside JavaScript proper... perhaps Moment
to correspond to Date
with a nod to the library.
I'm not suggesting it follow the moment library completely, but it might be a nice place to consider... An alternative may be more additions to Date
but I'm not sure that it's a good idea. I'd also suggest that some minimal formats are accepted, and some behaviors established.
Moment.DAYS
, Moment.MONTHS
, ...) in code, used for Date-time math... ex: someMoment.add(5, Moment.DAYS)
.toZone(timezoneId = localZone)
- instance from one timezone to another, with time adjustment.asZone(timezoneId = localZone)
- instance zone changed to another, without time adjustment.format(formatString)
- string formatting, including localization constructs/convensionsWork with the moment.js team to create a new version as a polyfill that aligns with the proposed design, I know that there's been talk about going immutable in particular, and there's been a lot of good work there.
The main link points to an outdated presentation and the polyfill link points to the spec...
We (are supposed to) assign reviewers to proposals as they move from stage 1 to stage 2. In order for a proposal to advance to stage 3, these reviewers must sign off on the spec text. We sometimes forget to assign reviewers, and sometimes forget who we assigned. This column will help us keep track of that.
On a related note, does anyone know who was supposed to review the function implementation hiding proposal? I couldn't find anything in the notes.
Love the capability in Kotlin which you can write your own DSL:
Things like generating model:
val people = People {
name = "albert"
job = {
company = "NZ"
title = "Dev"
}
}
Or handling logic:
permissionRequestHandler {
actualRequestCode = requestCode
expectRequestCode = this.requestCode
onSuccess {
// Do something when success
}
onFailure {
// Do something for the failure case
}
onNeverAskAgain {
}
}
And you can do something like this:
html {
body {
div {
}
}
}
The best part is that these DSL are nothing more than plain Kotlin, it's just the syntax layer which makes it looks like a DSL. So you can actually add other normal Kotlin code into it.
By doing this, it enables Domain Driven Design better in the language level. You can describe your core business logic in a hunman readable way. And even your marketing team can customize it. The only abstraction is the part that can be re-used across modules, but you can customize the other parts around it.
It requires 2 features:
fun takeLambda( callback: () -> Unit ) {
callback()
}
// Instead of calling it like this:
takeLambda ({
// declare the lambda body
})
// you can do this
takeLambda {
// put your lambda here
}
// Lambda can take parameter, when there is only one, its name will be `it`
takeLambda { it ->
// put your lambda here
}
// even call it implictly
takeLambda {
it.name = "ok"
}
// We now enable the People context on this lambda
fun takeLambda( callback: People.() -> Unit ) {
callback()
}
// Assume there is a People.name property, then you can do this
// Because the lambda got that context now
takeLambda {
name = "albert"
}
Then you can write your own DSL.
This is pretty huge feature which will enable tons of great idea and cool new syntax to solve particular problem.
To make it more declarative, there is another infix
function concept in Kotlin.
// if we have a function like this:
infix fun People.add(s: String) { /* ... */ }
// Then we can do this:
AnyPeopleObject add "abc"
I previously used a mock library which uses these features to create some very good DSL to mock:
every {
FuncCall()
} returns 2
Can we do this in Javascript ?
Sorry if I post in the wrong place.
Love Javascript and want it to evolve better.
Allow .
s to be included in object field names so that you can short hand field names.
Examples:
var obj = {
field1: "val",
field2.field3: "val2"
};
becomes
var obj = {
field1: "val",
field2: {
field3: "val2"
}
};
var obj = {
field1: "val",
field2.field3: "val2",
field2.field4: "val3"
};
would equal
var obj = {
field1: "val",
field2: {
field3: "val2",
field4: "val3"
}
};
and even
var obj.field = "val";
becomes
var obj = {
field: "val"
};
Proposals in ECMA 402 also have their status documented at https://github.com/tc39/ecma402/blob/master/README.md . We should decide one place or the other being the source of truth. I don't think this repository has everything currently; maybe we should remove them from here.
Links to "Tooling implementation status" issues for some proposals, so people can see whether their tools support the proposals. I check them when they are supported in WebStorm, Babel and Flow.
Just thought it could be updated.
Isn't Binary AST supposed to be at stage 1?
Can we please add an “author” column and distinguish authors from champions?
Context: I’m championing multiple proposals from community members. I don’t want credit for writing these proposals, though. It feels wrong to conflate being a champion with authorship.
Despite me explicitly mentioning the proposal authors during each of my presentations, some committee members mistakenly thought I was the author.
I’ve seen similar confusion in articles and blog posts about proposals, where a champion was credited as an author, based on the table in this repository.
Add special mark (like 🚀) for controversial proposals, which need extra attention before been implemented, require more constructive discussion or should be delayed.
According to tc39/ecmascript_simd@c6ca655, SIMD should be moved to inactive proposals.
How about an inbuilt function to find the depth of an array, There is already an Experimental feature Array.prototype.flatten(depth)
which accepts a depth value up to which array needed to be flatten
But there is no inbuilt way to get the depth of an array. Currently to get the depth we have to do something like. which is an implicit way to get depth.
function depthOf(arr) {
if(!Array.isArray(arr))
throw "Not an Array"
var depth = 1;
var i;
for(var i = 0; i< arr.length; i++){
if (!Array.isArray(arr[i])) continue;
if(Array.isArray(arr[i])){
var depth = depthOf(arr[i]) + 1;
depth = Math.max(depth, depth);
}
}
return depth;
}
If there is option to get depth explicitely that would be great. We already have property of array like Array.length
why not have another property like Array.depth
.
If we would have Array.depth
property then code can look something like this.
Note: below example caontains an experimental method of array
Array.prototype.flatten()
var arr1 = [1, 2, [3, 4, [5, 6]]];
arr1.flatten(arr1.depth);
// [1, 2, 3, 4, 5, 6]
Hi Folks 🖐️,
I was searching for proposals in meeting notes for my last improvement about "last presented columns". It is really hard to find anything in these notes. Do you have any plans for this? For this like, building a website or implementing these notes in an existing website would be a better solution. It's really painful this way and it's getting more complex each addition. Therefore, it can be implemented in the future.
I talked to some UX Designers about this repo, they will share their opinions soon. Besides, maybe we can ask them what we can improve on the beta website.
Date.prototype.toString
changed between ES2017 and ES2018, defining the format rather than leaving it as "implementation defined." Where's the proposal for that change? I don't see it listed on the finished proposals list (or the in-progress, etc.).
It could be worthwhile to list the RegExp.escape proposal with the inactive ones to make it more discoverable; it's still relevant and there's agreement about how to proceed with it, just no one's done the work.
The notes from september seem to make some changes that are not reflected on the README tables yet:
Atomics.waitAsync
to Stage 2Intl.RelativeTimeFormat
to Stage 3Because emulating (dispatchEvent) of mouse events (mouseenter, mouseover, mousedown) doesn't fire :hover
nor :active
CSS states we need a methods to toggle :active
and :hover
states. Like Element.focus()
toggles :focus and Element.blur()
removes :focus
state.
I write web App and I can translate touch* events into series of left mouse buttons clicks but without visual effects like hovered and activated states. It is annoying for me like for other 34 persons registered on Stack Overflow.
Currently we have to do like
// Grab the elemenets
const name1 = document.getElementById('name1');
const name2 = document.getElementById('name2');
const score1 = document.getElementById('score1');
const score2 = document.getElementById('score2');
const current1 = document.getElementById('current1');
const current2 = document.getElementById('current2');
const btnNew = document.getElementById('btnNew');
const btnRoll = document.getElementById('btnRoll');
const btnHold = document.getElementById('btnHold');
const dice = document.getElementById('dice');
Some Destructuring function would be useful
Example
const [name1, name2] = document.getDestructuredElementsByIds();
which should be equal to
const name1 = document.getElementById('name1');
const name2 = document.getElementById('name2');
The callable constructor proposal was withdrawn because "the same problems can be solved with decorators" but the readme here doesn't show examples of that. Can you please update that for reference? It would be really helpful.
https://github.com/tc39-transfer/dynamic-code-brand-checks was merged from two proposals that were approved for stage 1 from stage 0 last meeting. It's part of @tc39-transfer, but should be part of @tc39.
Stage | Total proposals | Active proposals | Inactive proposals |
---|---|---|---|
0 | 125 | 11 | 22 |
1 | 125 | 11 | 22 |
2 | 125 | 11 | 22 |
3 | 125 | 11 | 22 |
4 | 125 | 11 | 22 |
Such summary statistics will be helpful to developers, eg. to decide whether to adopt a proposal at stage 0 by examining the failure rate of stage 0 proposals (in the above example, it will be 22/125 = 17%).
It can be further broken down into past 1-year, 3-year, lifetime statistics etc.
I often see objects created like this:
const obj = {
isMuted: state.volume.isMuted
};
this proposal is to allow this equivalent syntax instead:
const obj = {
state.volume.isMuted
};
The last key isMuted
of the state.volume.isMuted
expression will be set as a key on the new object.
Hello all,
I am starting to have real trouble following the active proposals through this repo. The problem seems to be that there are proposals that have been on there and stuck at say stage 1 for a very long time. Possibly it would be helpful to have an additional column to show the last meeting each one was discussed in or even the last time the spec repo was updated.
What do you do with proposals that have been accepted to stage 1 or greater but are lacking in strong interest and/or have champions who are actively working on other proposals. Perhaps there should be an "at-risk" column for proposals that have sat without movement for a few cycles.
Whatever the solution is I think it would be helpful if that list was being pruned in some way.
Many of the links at https://github.com/tc39/proposals are to personal repositories. Some of these already redirect to a tc39 repository but many do not, including a stage 2 proposal. When should proposals migrate to a tc39 repository? Does the process document or any other document say?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.