mceSystems / node-jsc

A node.js port to the JavaScriptCore engine and iOS
Other
221 stars 16 forks source link

Proposal: Applying WebKit coding style to deps/jscshim #19

Open Constellation opened 5 years ago

Constellation commented 5 years ago

deps/jscshim is tightly coupled with the WebKit source code (in particular, deps/jscshim/src/shim), and it leverages various WebKit code. Applying WebKit coding style can improve the code quality of this directory. It brings several benefits.

  1. WebKit JavaScriptCore code is based on this coding style. By using the same coding style, we can borrow the best practices used in the JSC side.
  2. Tooling support. For example, clang-format supports webkit style.
MCE-KobyBo commented 5 years ago

Hey, sorry for the late reply, been away for a couple of weeks. I tend to agree :) First of all, coding style in deps/jscshim is currently a bit of a mess, as it's a mix of my own code and pieces from Webkit, node-chakracore, etc., so it definitely needs one consistent style. Regarding WebKit's style, I agree that since jscshim is tightly coupled with the WebKit, it probably makes since to use the same style. It's a bit different from mine, but I think it is worth trying. So, I'll add this to my todo list :)