>> This would make things easier to understand. When I explain this aspect of >> JavaScript to others, they are often stumped, but I have never encountered >> anyone who was confused by Python: >> class MyClass: >> def mymethod(self): >> return "hello world" >> def myfunction(): >> return "hello world" >> >> So this is probably my real point: can we make things as un-confusing as in >> Python? > > Python has its confusing parts too.
Yes, I only meant when it comes to functions versus methods. > Explaining things to beginners still will involve explaining 'function' > (long-form) syntax for the foreseeable future, so you don't gain anything by > crippling arrow syntax. > > But once beginners learn more, they will hate having to write out the long > form for all the dynamic this cases that can't be written using > method-in-initialiser syntax. Agreed. If a simplification could be done naturally, that would be great. But as that seems impossible, forcing things does not make sense. -- Dr. Axel Rauschmayer a...@rauschma.de twitter.com/rauschma home: rauschma.de blog: 2ality.com
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss