Re: javascript vision thing

2018-07-25 Thread Mark Volkmann
For me the biggest thing JSON lacks is the ability to add comments. --- R. Mark Volkmann Object Computing, Inc. > On Jul 25, 2018, at 4:26 AM, Isiah Meadows wrote: > > IMHO, I'd like to see four things: > > - Native JSON multi-object support > - Binary data support th

Re: es-discuss Digest, Vol 131, Issue 16

2018-01-14 Thread Mark Volkmann
when some libraries do not have type definitions is still far better than not using types at all. --- R. Mark Volkmann Object Computing, Inc. > On Jan 13, 2018, at 9:49 PM, Ranando King <king...@gmail.com> wrote: > > Stripping the types does solve the runtime problem, but o

Re: es-discuss Digest, Vol 131, Issue 16

2018-01-13 Thread Mark Volkmann
If optional types in JS were implemented like they are in Flow, the types would be stripped before runtime. There are only there for pre-runtime type checking. So nothing related to optimization would change and there would be no runtime type checking. --- R. Mark Volkmann Object Computing

Re: Proposal: Optional Static Typing (Part 3)

2018-01-13 Thread Mark Volkmann
gt;> > It seems like a lot of these features already aren't included in the >> proposal. I definitely hold your view that the proposal has to be minimal, >> but I think my minimal is functionally minimal. Something that when >> implemented allows developers to experiment and then discussion can >> progress from there to how more features can be added. I'm trying to be >> thourough though as to not harm a future proposal so if any of my decisions >> block something I'm open to changes. >> > >> > Most of my thoughts and focus have been on what I think of as the >> basics. How types interact with declarations, functions, classes, >> destructuring, allocation, and control structures. The future consideration >> sections are mostly a catalogue of ensuring that these basic initial >> features and designs will work as the language incorporates other proposals. >> > ___ >> > es-discuss mailing list >> > es-discuss@mozilla.org >> > https://mail.mozilla.org/listinfo/es-discuss >> ___ >> es-discuss mailing list >> es-discuss@mozilla.org >> https://mail.mozilla.org/listinfo/es-discuss >> > > > > ___ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > > -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: .sort strange behavior

2017-10-21 Thread Mark Volkmann
By default sort converts the values to strings and compares there Unicode values. For example, 10 would come before 3. In the first example you are overriding the default sort comparison in a way that is correct for numbers. --- R. Mark Volkmann Object Computing, Inc. > On Oct 21, 2017, a

Re: Existential Operator / Null Propagation Operator

2016-10-13 Thread Mark Volkmann
>> ``` >> >> I’m curious why this proposal is not even listed in stage 0 proposal list. >> >> >> Because no representative of TC39 has volunteered to champion it. >> >> —Claude >> >> >> ___ >&g

Re: Proposal: anaphoric if and while syntax

2016-09-15 Thread Mark Volkmann
ailing list >> es-discuss@mozilla.org >> https://mail.mozilla.org/listinfo/es-discuss >> > > ___ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > > -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

for-of loop

2015-08-22 Thread Mark Volkmann
to use either foo or bar after of in a for-of loop? --- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: for-of loop

2015-08-22 Thread Mark Volkmann
, Alexander Jones a...@weej.com wrote: Arrays are not iterators - they have no `next` method. '`for-of` works on iterables. On Saturday, August 22, 2015, Mark Volkmann r.mark.volkm...@gmail.com wrote: I understand Arrays in ES 2015 are both iterable (have Symbol.iterator method

await on synchronous functions

2015-07-17 Thread Mark Volkmann
I know the spec for this isn't finalized, but what is the current direction for the behaviour when await is used on a function that is not marked async and doesn't return a Promise? Should it run immediately or wait for the next turn of the event loop? -- R. Mark Volkmann Object Computing, Inc

Re: await on synchronous functions

2015-07-17 Thread Mark Volkmann
___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org

Re: await on synchronous functions

2015-07-17 Thread Mark Volkmann
___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org

Re: await on synchronous functions

2015-07-17 Thread Mark Volkmann
@mozilla.org https://mail.mozilla.org/listinfo/es-discuss ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- R. Mark Volkmann Object Computing, Inc

treated as a module if ...

2015-07-05 Thread Mark Volkmann
Fill in the blank. In ES 2015, a JS source file is treated as a module if _. a. it exports anything b. it imports anything c. both a and b d. something else --- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss

Re: treated as a module if ...

2015-07-05 Thread Mark Volkmann
. On Sun, Jul 5, 2015, 09:03 Mark Volkmann r.mark.volkm...@gmail.com wrote: Fill in the blank. In ES 2015, a JS source file is treated as a module if _. a. it exports anything b. it imports anything c. both a and b d. something else --- R. Mark Volkmann Object Computing, Inc

Re: Re: The Tragedy of the Common Lisp, or, Why Large Languages Explode (was: revive let blocks)

2015-06-19 Thread Mark Volkmann
/listinfo/es-discuss ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss

import ModuleSpecifier

2015-05-31 Thread Mark Volkmann
'; I don't see any place in the spec. where it describes whether ModuleSpecifier should include a file extension. Maybe I just missed it. Is Traceur correct to require it? -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss

Re: import ModuleSpecifier

2015-05-31 Thread Mark Volkmann
-discuss-boun...@mozilla.org] *On Behalf Of *Mark Volkmann *Sent:* Sunday, May 31, 2015 17:21 *To:* es-discuss@mozilla.org *Subject:* import ModuleSpecifier I was under the impression that the following is a valid import statement: import {something} from './somefile'; I know

Re: 'stream' values

2015-05-06 Thread Mark Volkmann
The entries method of a Map doesn't take a function. It does return an array though. That array contains [key, value] arrays. So you could do this. map.entries().sort(([k1, v1], [k2, v2]) = k1.localeCompare(k2)).forEach(([k, v]) = do-something); --- R. Mark Volkmann Object Computing, Inc

generator function requirements

2015-04-12 Thread Mark Volkmann
I couldn't find this in spec. Is it required for generator functions to return an object that is both iterable (has Symbol.iterator method) and an iterator (has next method). It seems Babel does this, but I want verify whether that is required. -- R. Mark Volkmann Object Computing, Inc

last value from iterator

2015-04-05 Thread Mark Volkmann
done is true? Clearly consumers shouldn't have to be aware of whether the iterator is actually a generator and whether it ends by returning a value. --- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https

Re: Property names for public symbols

2015-02-08 Thread Mark Volkmann
I'm curious why one of the public symbols has a name that ends with Tag (toStringTag), but the others don't (such as toPrimitive). Maybe toStringTag should be changed to toString. __ __ / \/ \ \ /ark Object Computing, Inc. \ / \/olkmann On Sun, Feb 8, 2015 at 4:20

Re: Property names for public symbols

2015-02-06 Thread Mark Volkmann
Agreed, like at the constants on the Math object. --- R. Mark Volkmann Object Computing, Inc. On Feb 6, 2015, at 12:39 AM, Axel Rauschmayer a...@rauschma.de wrote: I know that this is a small nit and that it’s probably too late, but: Shouldn’t public symbols (`Symbol.iterator` etc.) have

Re: JavaScript 2015?

2015-01-22 Thread Mark Volkmann
I do the same as Kevin. --- R. Mark Volkmann Object Computing, Inc. On Jan 22, 2015, at 4:51 PM, Kevin Smith zenpars...@gmail.com wrote: FWIW, here's the rule of thumb that I tend to use: - When referring to the language in general, it's Javascript or JS. - When referring to a specific

Re: A new ES6 draft is available

2015-01-19 Thread Mark Volkmann
Maybe this is wrong, but I'm in the habit of thinking that if something has a value of null, something in JavaScript code (mine or a library I'm using) explicitly set it to null. If something has a value of undefined, it was never set. For that reason, I'd prefer using undefined in this case over

Re: Set.prototype.entries: indices as keys?

2015-01-18 Thread Mark Volkmann
+1 --- R. Mark Volkmann Object Computing, Inc. On Jan 18, 2015, at 6:28 AM, Axel Rauschmayer a...@rauschma.de wrote: Currently the keys of the entries returned by `Set.prototype.entries()` are the same as the values: ```js let set = new Set(['a', 'b']); let pairs = [...set.entries

Fwd: (x) = {foo: bar}

2015-01-05 Thread Mark Volkmann
In addition, I don't think Traceur supports that syntax yet. I have had to do this instead: let f = x = { return {foo: bar}; }; __ __ / \/ \ \ /ark Object Computing, Inc. \ /olkmann \/ ___ es-discuss mailing list

Re: (x) = {foo: bar}

2015-01-05 Thread Mark Volkmann
! On Mon, Jan 5, 2015 at 2:48 PM, Mark Volkmann r.mark.volkm...@gmail.com wrote: In addition, I don't think Traceur supports that syntax yet. I have had to do this instead: let f = x = { return {foo: bar}; }; ___ es-discuss mailing list es

generator libraries

2015-01-03 Thread Mark Volkmann
by a TC39 member. Can anyone point me to a library like that? -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

iterating through object property values

2014-12-03 Thread Mark Volkmann
. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Map: filter/map and more

2014-11-20 Thread Mark Volkmann
rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org

what makes a file a module?

2014-10-19 Thread Mark Volkmann
I understand that module code is implicitly in strict mode. In an ES6 environment, what causes a .js file to be treated as a module? Does that happen automatically to all files that export at least one thing? -- R. Mark Volkmann Object Computing, Inc

Re: what makes a file a module?

2014-10-19 Thread Mark Volkmann
. That may lead people to always specify it with 'use strict'. I was hoping to not have to do that. -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: what makes a file a module?

2014-10-19 Thread Mark Volkmann
:47 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Oct 19, 2014, at 2:28 PM, Mark Volkmann wrote: On Sun, Oct 19, 2014 at 4:23 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: It is implementation dependent how it is determined whether an individual file will be parsed as a Script

Re: Re: ES6 iteration over object values

2014-09-28 Thread Mark Volkmann
What happened to adding the Object.values and Object.entries methods? There was some discussion that led me to believe these would be in ES6. Are they now targeted for ES7? -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es

Re: Single import from modules without default export

2014-08-06 Thread Mark Volkmann
+1 to Kevin's suggestions. --- R. Mark Volkmann Object Computing, Inc. On Aug 6, 2014, at 7:10 AM, Kevin Smith zenpars...@gmail.com wrote: Completely agree, the default should be removed. This is simply a proposal of how we can still have a simple import statement (`import $ from jQuery

ES6 talk slides

2014-07-09 Thread Mark Volkmann
Here's a link to my slides from a recent talk I gave on ES6. I thought some on this list my find it interesting and others might send me corrections. ;-) http://sett.ociweb.com/sett/settJul2014.html -- R. Mark Volkmann Object Computing, Inc. ___ es

Re: ES6 talk slides

2014-07-09 Thread Mark Volkmann
Are you sure? I just tried it and it worked for me. On Wed, Jul 9, 2014 at 1:23 PM, Maxime Warnier mar...@gmail.com wrote: Your link seems to be broken ;) 2014-07-09 17:41 GMT+02:00 Mark Volkmann r.mark.volkm...@gmail.com: Here's a link to my slides from a recent talk I gave on ES6. I

Re: ModuleImport

2014-06-26 Thread Mark Volkmann
import after the as. Yes! I would SO much happier with this if the curly braces were removed. -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: ModuleImport

2014-06-19 Thread Mark Volkmann
What is the behavior if a module doesn't define a default export and the syntax for importing the default export is used? What is the behavior if a module only defines a default export and the syntax for importing named imports is used? --- R. Mark Volkmann Object Computing, Inc. On Jun 19

Re: ES6 modules (sorry...)

2014-06-16 Thread Mark Volkmann
___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- R. Mark Volkmann

Re: Rationale for dropping ModuleImport syntax?

2014-06-09 Thread Mark Volkmann
. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss

await and promise

2014-03-30 Thread Mark Volkmann
foo() { // some code that eventually calls resolve or reject } Is this a crazy idea? Perhaps if this was available, it would be very rare to actually write new Promise( in code. -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es

Re: await and promise

2014-03-30 Thread Mark Volkmann
I was wrong about that. On Sun, Mar 30, 2014 at 8:59 AM, Erik Arvidsson erik.arvids...@gmail.comwrote: The done function is injected by the Traceur test runner for async tests. It is standard mocha stuff. On Sunday, March 30, 2014 9:06:23 AM, Mark Volkmann r.mark.volkm...@gmail.com wrote

article on ES6 and Traceur

2014-03-26 Thread Mark Volkmann
Here's an article I wrote recently that may be of interest. It covers automating the use of Traceur to generate ES5 code. http://sett.ociweb.com/sett/settApr2014.html -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss

module exports

2014-03-14 Thread Mark Volkmann
module exports that it identified as the default (presumably the most commonly used things) To define the default subset of things to export from a module, export default = some-value or some-function; where some-value could be an object holding a collection of things to export. -- R. Mark

Re: module exports

2014-03-14 Thread Mark Volkmann
at 8:22 AM, Domenic Denicola dome...@domenicdenicola.com wrote: Have you ever used JavaScript module systems before? If so, the idea of a default export should be somewhat familiar... On Mar 14, 2014, at 6:31, Mark Volkmann r.mark.volkm...@gmail.com wrote: I'm trying to understand

Re: module exports

2014-03-14 Thread Mark Volkmann
just focus on eliminating this one pointless and confusing aspect (the export default [expr] form), we'll be good to go. -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo

Re: module exports

2014-03-14 Thread Mark Volkmann
waldron.r...@gmail.comwrote: On Fri, Mar 14, 2014 at 10:07 AM, Mark Volkmann r.mark.volkm...@gmail.com wrote: On Fri, Mar 14, 2014 at 8:54 AM, Kevin Smith zenpars...@gmail.comwrote: I'm trying to understand how that compares to ES6 modules. I see how in ES6 I can import specific things from

ES6 iteration over object values

2014-03-14 Thread Mark Volkmann
Does ES6 add any new ways to iterate over the values in an object? I've done a lot of searching, but haven't seen anything. I'm wondering if there is something more elegant than this: Object.keys(myObj).forEach(function (key) { let obj = myObj[key]; // do something with obj }); -- R. Mark

Re: Template strings and templates

2014-03-07 Thread Mark Volkmann
It seems to me that the main benefit is that it takes care of parsing out the template parts around the expressions for you. Otherwise you might write a regular expression to do that. --- R. Mark Volkmann Object Computing, Inc. On Mar 6, 2014, at 5:29 PM, Caitlin Potter caitpotte...@gmail.com

typed arrays

2014-03-03 Thread Mark Volkmann
/ . -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Array.of

2014-03-02 Thread Mark Volkmann
What is an example of a use case where one would choose to use Array.of instead of the literal array syntax? -- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

let and file scope

2014-03-01 Thread Mark Volkmann
Does a top-level let in a file (not inside any function) create a global variable just like var or does it create a variable that is scoped to the source file? --- R. Mark Volkmann Object Computing, Inc. ___ es-discuss mailing list es-discuss