# Usage of "empty" structs

**URL:** <https://discourse.julialang.org/t/usage-of-empty-structs/18968>\
**Category:** General Usage\
**Created:** [December 25, 2018, 12:20am UTC](https://discourse.julialang.org/t/usage-of-empty-structs/18968 "2018-12-25T00:20:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bennedich](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bennedich/32/4894_2.png) [@bennedich](https://discourse.julialang.org/u/bennedich)\
**Post date:** [December 25, 2018, 12:28am UTC](https://discourse.julialang.org/t/usage-of-empty-structs/18968/2 "2018-12-25T00:28:47Z")

</div>

It’s often used for multiple dispatch. Example:

```julia
abstract type RangeStepStyle end

struct RangeStepRegular <: RangeStepStyle end
struct RangeStepIrregular <: RangeStepStyle end

range_step(n, ::Type{RangeStepRegular}) = println("regular step: $n")
range_step(n, ::Type{RangeStepIrregular}) = println("not a normal step: $n")

range_step(3, RangeStepRegular)
range_step(6, RangeStepIrregular)

```

Result:

```julia
regular step: 3
not a normal step: 6

```

---

_[View the full topic](https://discourse.julialang.org/t/usage-of-empty-structs/18968)._
