Skip to content

Commit ff2aafa

Browse files
authored
README tweaks
1 parent c0ad747 commit ff2aafa

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ message.match(
5252
```
5353

5454
In this example only one of the two lambdas will be executed depending on the message type, just like with the
55-
if-statements. `match` is just a method that takes lambdas as arguments, but if you write expressions with linebreaks
55+
if-statements. `match` is just a method that takes functions as arguments, but if you write expressions with linebreaks
5656
like in the example above it looks quite similar to a switch-statement, a match-expression in Scala, or a
5757
when-expression in Kotlin. DataEnum makes use of this similarity to make match-statements look and feel like a
5858
language construct.
@@ -143,11 +143,11 @@ Some things to note:
143143
it easier to filter out from artifacts and exclude from static analysis.
144144

145145
- The methods in the interface have to be declared as returning a `dataenum_case`. Each method
146-
corresponds to one of the possible cases of the enum, and the parameters of the method becomes the
147-
parameters of that case. Note that the method names from the interface will be used as class names
146+
corresponds to one of the possible cases of the enum, and the parameters of the method become the
147+
member fields of that case. Note that the method names from the interface will be used as class names
148148
for the cases, so you'll want to name them using CamelCase as in the example above. The methods
149-
will never be implemented, and there is no way to create a `dataenum_case` instance, the type is
150-
only used as a marker.
149+
 in the `_dataenum` interface will never be implemented, and there is no way to create a `dataenum_case`
150+
instance. The type is only used as a marker.
151151

152152
- The prefix of the `@DataEnum` annotated interface will be used as the name of a generated super-class
153153
(`MyMessages` in the example above). This class will have factory methods for all the cases.

0 commit comments

Comments
 (0)