# Fields versus methods in expression language

**URL:** https://discuss.hail.is/t/fields-versus-methods-in-expression-language/144
**Category:** Updates
**Created:** [March 3, 2017, 9:16pm UTC](https://discuss.hail.is/t/fields-versus-methods-in-expression-language/144 "2017-03-03T21:16:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jigold](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/jigold/32/143_2.png) [@jigold](https://discuss.hail.is/u/jigold)
#### Post date: [March 3, 2017, 9:16pm UTC](https://discuss.hail.is/t/fields-versus-methods-in-expression-language/144/1 "2017-03-03T21:16:30Z")

</div>

In the new expression language documentation, we distinguish between fields and methods on [Types](https://hail.is/hail/types.html).

**Fields**

- Attributes of an object
- Do not have parentheses

**Methods**

- Function calls on an object
- Do **require** parentheses

**Example**

```auto
variants.filter(v => v.contig == "X" && v.isBiallelic()).count()

```

`contig` is a field on `Variant`, `isBiallelic()` is a method on `Variant`, and `count()` is a method on `Aggregable`.

**In the near future, Hail will enforce the difference between fields and methods, throwing an error for expressions like `x.toInt` and `gs.count`.**
