Skip to content

Use explicit declarations over using NAN Macros #66

Description

@MichaReiser

The Nan documentation suggests to declare methods explicitly over using the Nan Macros.

void MethodName(const Nan::FunctionCallbackInfo<v8::Value>& info) {
  ...
}

instead of

NAN_METHOD(MethodName {
  ...
}

The explicit declaration is suggested not only for JS method implementations but also for getters, setters...

The more explicit way has the advantage that many IDEs provide better IntelliSense and is generally either understood by humble humans as well.

It is, therefore, probably advisable to migrate the existing code base to use explicit method declarations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions