BTF Measurements

Allen Wirfs-Brock allen at
Wed Mar 14 13:53:25 PDT 2012

On Mar 13, 2012, at 6:20 PM, Rick Waldron wrote:

> Kevin, 
> Over the weekend I applied David Herman's new tri-lambda syntax to Popcorn.js to see how it would look and feel: 
> ...

So when I scan the diffs and my eye pass over pairs of changes like:

-(function(global, document) {
+((global, document) -> {
-          var DOMContentLoaded  = function() {
+          let DOMContentLoaded = () -> {
-    Popcorn.p[ api ] = function() {
+    Popcorn.p[ api ] = () -> {
-    script.addEventListener( "load",  function() {
+    script.addEventListener( "load", () -> {

my eyes invariably go to the first line of each pair and I have a minor mental WTF moment when I look at the second line. Now some of this is no doubt a matter of familiarity, but does anyone really think that the second forms are more readable even with experience.  At least in western cultures, are brains are trained from a early age to recognize meaning in words. Symbols are far less common and symbol semantically meaningful symbol sequences are even rarer. 

In what way does this syntax help people read and understand code?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list