# Understand Base.similar in doc section Customizing broadcasting

**URL:** https://discourse.julialang.org/t/understand-base-similar-in-doc-section-customizing-broadcasting/56388
**Category:** New to Julia
**Created:** [March 3, 2021, 9:01am UTC](https://discourse.julialang.org/t/understand-base-similar-in-doc-section-customizing-broadcasting/56388 "2021-03-03T09:01:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)
#### Post date: [March 3, 2021, 9:01am UTC](https://discourse.julialang.org/t/understand-base-similar-in-doc-section-customizing-broadcasting/56388/1 "2021-03-03T09:01:56Z")

</div>

I am trying to customizing broadcasting my own type. However, I found the Julia doc section is little bit hard to follow. Can here someone tell me what is the use of the `ElType` argument in

```julia
Base.similar(bc::Broadcasted{DestStyle}, ::Type{ElType})

```

In particular, for the following example, I cannot understand this line

```julia
ArrayAndChar(similar(Array{ElType}, axes(bc)), A.char)

```

Why not implement a `similar` method for `ArrayAndChar` such as

```julia
Base.similar(a::ArrayAndChar)
    return ArrayAndChar(a.data, a.char)
end

```

Then the above line can be simply written as

```julia
similar(A)

```

What am I missing?
