[Webkit-unassigned] [Bug 20141] Cannot call pointer to function console.log

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 14 14:01:37 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=20141





--- Comment #31 from Victor Costan <costan at gmail.com>  2013-04-14 13:59:51 PST ---
Kyle, yes, the statement that you suggested would work. I'm not sure how to do the feature detection without risking spamming the log, though. If this patch doesn't work out, I might have to write some extension that effectively does that in the developer tools.

Glenn, I'm sorry, I'm having a really hard time following your argument.

"There are lots of things that slow down development, but this isn't one of them." seems to imply that this change won't make developers' life better. The fact that I took the time to figure out how console works in WebKit and put together this patch means that it would make _my_ life better. Also, my experience (and the stars on the Chromium bug) indicate that there is a class of people whose lives will be better, which is why I'm trying to get WebKit fixed instead of implementing a personal solution.

Given that this change would make some people's lives better, I would like to understand how it would make your life worse, so we can see if there's a way to make things work for everyone. You can still use "console" the way you used to.

I think that consistency is a good goal to aim for, because it helps us learn the platform faster, which makes us more productive. At the same time, it's important to remember that consistency is a means to achieve efficiency, not a goal on its own.

Also, sorry for repeating myself, but this change doesn't cripple console.log, so it still works in the way that you'd expect, based on DOM APIs. It only makes console.log more powerful than the DOM APIs. I think it's reasonable to expect that a debugger is more powerful than the platform APIs. For example, I will expect the Web Inspector to show me an object's ES6 private name properties and their values, even though the (draft) specification clearly says that they shouldn't be visible without the names.

Last point on consistency: I don't think IE's behavior is very relevant. During my Web development classes at MIT, the Microsoft folks admitted that they develop on Chrome and test on IE, so I don't think IE sets a good example for developer friendliness. FWIW, node.js's console.log is a function, but again I think this patch should be considered based on usefulness.

I think the real cost of this patch is the extra complexity in the WebKit code. I also think it's hard to objectively assess whether the complexity is worth the efficiency boost I mentioned above. For whatever it's worth, I plan to help with any necessary follow-up work (like I did in #111255), and to help revert this change if ends up being a major pain down the line.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list