BTF Measurements

Aymeric Vitte vitteaymeric at gmail.com
Wed Mar 14 15:05:43 PDT 2012


For me no. I have looked into popcorn.js today and could not convince 
myself that it was more readable, maybe it's a question of history or 
feelings (and to get used to it) but without being an expert in all 
languages, I consider js to be a unique (clever) language, using the 
arrow notation makes it look like others, this argument might look weak 
but for js or others I am not a fan of the arrow notation... will not 
make friends, I know

It is confusing right now whether the arrow proposal and do proposal are 
distinct/exclusive or not

I read about popcorn (--> Herby) :

error: ( msg ) -> {
     throw new Error( msg );
}

which should be

error (msg) {
     throw new Error( msg );
}

Where is this specified ? And what happens with get: function() {.....} 
or set ?

Le 14/03/2012 21:53, Allen Wirfs-Brock a écrit :
>
> 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:
>>
>> https://github.com/rwldrn/popcorn-js/compare/tri-lambda
>> ...
>
> So when I scan the diffs and my eye pass over pairs of changes like:
>
>     -(function(global, document) {
>
>     +((global, document) -> {
>
> or
>
>     - var DOMContentLoaded  = function() {
>
>     + let DOMContentLoaded = () -> {
>
> or
>
>     -    Popcorn.p[ api ] = function() {
>
>     +    Popcorn.p[ api ] = () -> {
>
> or
>
>     -    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?
>
> Allen
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-- 
jCore
Email :  avitte at jcore.fr
Web :    www.jcore.fr
Webble : www.webble.it
Extract Widget Mobile : www.extractwidget.com
BlimpMe! : www.blimpme.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120314/170619d9/attachment-0001.html>


More information about the es-discuss mailing list