Expression-bodied.

 
Krok: Trucchi: well, import { a, b } from c is already supported, and you can do DCE on that. gajus’s point is mostly that it puts a and b in the lexical scope, and they’d rather have it namespaced. I particularly don’t see the point of having it namespaced.

Mcnevin: Do i have to wait for external js via do***ent ready or does it just have to be loaded above in my html code?

Trucchi: Also you can alias a and b already

Trucchi: And ES6 syntax is trying to encourage people to the one export per module paradigm

Trucchi: Which means that if the export is an object, it may or may not cause issues to not import the whole object

Spartin: Trucchi: that’s not the feeling I get from it

Devino: I thought babel namespaces the imports, instead of declaring variables

Morishito: You can use export many times

Trucchi: Sorry, I SHOULD say: you can, but they don’t come in as an object

Trucchi: It draws a line between the two

Doeberling: Babel implements a lot of things The Wrong Way™ 😀

Virgel: The idea is to not have objects.

Keniston: As in, import {x, y, z} from ‘foo’; x; y; z; compiles to var _foo = require’foo’; _foo.x; _foo.y; _foo.z

Kerzer: Which helps linking a lot

Trucchi: Babel does it the best way they can given they need to wrap cjs

Trucchi: The whole “multiple exports as an object” was a workaround to begin with

Vandewerker: That’s wrong btw. They should be doing if !’x’ in _foo throw new ReferenceError”foo does not export x”; _foo.x; .

Miyanaga: ES6 requires early errors for thingies.

Trucchi: Babel keeps them separate by making the default export live on Module.default, and all the others on Module.foo, Module.bar. So if you use the ES6 syntax, import myModule gives you Module.default. But if you try require’myModule’, you get { default: whatever, foo:., bar:. }

Trucchi: In other words, it’s still using the object workaround but extracting it away – UNLESS you try to use a CommonJS require somewhere, then you’re gonna pull down the curtain

Eckmann: Dekok: pls you’re getting too technical for me

Kleftogiannis: I’m a very technical person

Rehn: Dekok: cl***ic engineer

Bare: Knows how everything works

Conran: I am trying to view the values of an object. However, it is only showing the second entry for both loops. I am using for.in, so I am not sure why it is doing this.

Mirchandani: Has no idea what any of it is called

Heidenreich: Http://pastebin.com/r7bN8RMt

Wakley: Deltab: If something is only being applied to the ‘last’ one of many, you might have a scoping problem. e.g.: in for i=0; i5; ++i {doXfunction{ doYi; };} doY’ might only receive 5 as a value. You can solve this using closures, so see !closures. For more info see http://www.mennovanslooten.nl/blog/post/62/

Freniere: I have the value of obj in a comment

Drewery: I’m not using that type of for.

Rannels: Ruudiluca: the easy answer is: never use loops.

Sakoda: What if you want to iterate something?

Drummey: Ruudiluca: for this particular case, you can use Object.keysyourObject.someIterationiterationFunction, where someIteration is one of forEach, map, filter, some, every, reduce, depending on what you want to do.

Paullus: Hmm. I’ll give that a go.

Szmidt: Var a = { a: 1, b: 2 }; Object.keysa.mapfunctionx ax.reducefunctiona, b a + b, 0

Karpen: Object.keysobj.forEach

Bagwell: L8D: SpiderMonkey’s ancient “function expressions”

Sowders: I am processing cursor keys as inputs for a thing on screen, i want to prevent them from being used for general scrolling, how is that done?

Charlette: An older way of writing x = ax

Renfrew: Functions?! AS EXPRESSIONS?!?!

Goben: Expression-bodied functions