Loading ...
Sorry, an error occurred while loading the content.

Re: Indentation quirk?

Expand Messages
  • caerusx
    Good morning! I was thinking about mixing open and compact forms. And I think disallowing to use open inside compact and vice verse brings inconveniences. It s
    Message 1 of 4 , Jan 23, 2012
    • 0 Attachment
      Good morning!

      I was thinking about mixing open and compact forms. And I think
      disallowing to use open inside compact and vice verse brings
      inconveniences.

      It's fine for lint to use function parameters in compact form:

      func(1, 2, 3,
      ~~~~~4, 5, 6, function () {});

      But when one parameter listed in compact form internally contains open
      form, lint fails to validate:

      func(1, 2, 3,
      ~~~~~4, 5, 6, function () {
      ~~~~~});

      To pass validation, it's needed to rewrite outer block to open
      form. Do you agree that code below, which is correct from lint point
      of view, looks worse for a human?

      func(
      ~~1,
      ~~2,
      ~~3,
      ~~4,
      ~~5,
      ~~6,
      ~~function () {
      ~~}
      );
    Your message has been successfully submitted and would be delivered to recipients shortly.