Allen Wirfs-Brock wrote:
On Aug 8, 2012, at 6:14 PM, Brendan Eich wrote:
No problem. For anyone used to Pascal or Ada, or familiar with Go, := could
indeed be a speedbump.
(or Smalltalk, ;-)
But not a big speed-bump. For a Pascal programmers moving directly to ES
without any exposure to a C-syntax language, I'm pretty sure that =/:=
confusion isn't going to be the biggest hurdle they will have to deal with.
It's not just old programmers coming out of hypersleep (Ada is still
used, but nm). The := spelling by itself is close to =, and Doug indeed
thought it was a workalike. But it's really not.
To switch metaphors from speedbumps, there's smoke. I am not as
confident as you that there is no fire.
I think it is pretty optimistic to suppose that some day down the road
when := support is in all target browsers and runtimes, the convenience
of := will mean developers choose it where they would otherwise choose =
instead of using Object.defineProperty. They have to know they're
defining not assigning. The convenience of = or inconvenience of
Object.defineProperty doesn't enter into that "have to know" condition
or whether it is satisfied.
People will always prefer = if there's confusion about assigning vs.
defining, even with :=. Assignment is the "obvious thing".
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss