Skip to content

Commit

Permalink
chore: readme improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
martianoff committed Jun 30, 2024
1 parent 29e874e commit 76902ae
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ The idea is based on Scala Option and Java Optional. The package allows to creat

## Features

- *Optional Values:* This module introduces the Option[T] type, which represents optional values. An Option[T] either contains a value of type T (represented as Some(T)) or no value at all (represented as None).
- *Safe Handling of Missing Values:* The Option[T] type encourages safer handling of missing values, avoiding null pointer dereferences. It can be checked for its state (whether it's Some or None) before usage, ensuring that no nil value is being accessed.
- *Functional Methods:* The module provides functional methods such as Map, FlatMap etc. that make operations on Option[T] type instances easy, clear, and less error-prone.
- *Pattern Matching:* The Match function allows for clean and efficient handling of Option[T] instances. Depending on whether the Option[T] is Some or None, corresponding function passed to Match get executed, which makes the code expressive and maintains safety.
- *Equality Check:* The Equal method provides an efficient way to compare two Option[T] instances, checking if they represent the same state and hold equal values.
- *Generics-Based:* With Generics introduced in Go, the module offers a powerful, type-safe alternative to previous ways of handling optional values.
- *Json serialization and deserialization:* Build-in json support
- **Optional Values:** This module introduces the Option[T] type, which represents optional values. An Option[T] either contains a value of type T (represented as Some(T)) or no value at all (represented as None).
- **Safe Handling of Missing Values:** The Option[T] type encourages safer handling of missing values, avoiding null pointer dereferences. It can be checked for its state (whether it's Some or None) before usage, ensuring that no nil value is being accessed.
- **Functional Methods:** The module provides functional methods such as Map, FlatMap etc. that make operations on Option[T] type instances easy, clear, and less error-prone.
- **Pattern Matching:** The Match function allows for clean and efficient handling of Option[T] instances. Depending on whether the Option[T] is Some or None, corresponding function passed to Match get executed, which makes the code expressive and maintains safety.
- **Equality Check:** The Equal method provides an efficient way to compare two Option[T] instances, checking if they represent the same state and hold equal values.
- **Generics-Based:** With Generics introduced in Go, the module offers a powerful, type-safe alternative to previous ways of handling optional values.
- **Json serialization and deserialization:** Build-in json support

## Example

Expand Down

0 comments on commit 76902ae

Please sign in to comment.