title: Lombok getter/setter vs Java 14 record
body: <p>I love project <a href="https://projectlombok.org/" rel="noreferrer">Lombok</a> but in these days I'm reading and trying some of the new features of java 14.</p>
  <p>Inside the new capability, there is the <a href="https://openjdk.java.net/jeps/359" rel="noreferrer">record</a> keyword that allows creating a class with already built-in the following functionality: constructor, private final fields, accessors, equals/hashCode, getters, toString methods.</p>
  <p>Now my question is: is better to rely on the feature of Lombok or should we start using the record functionality:</p>
  <p>Is better to use this:</p>
  <pre class="lang-java prettyprint-override"><code>record Person (String name, String surname) {}
  </code></pre>
  <p>or that:</p>
  <pre class="lang-java prettyprint-override"><code>@AllArgsConstructor
  @ToString
  @EqualsAndHashCode
  public class Person {
    @Getter private int name;
    @Getter private int surname;
  }
  </code></pre>
  <p>What are the pros and cons of the both approach?</p>