# What is the future of \`sin(::Vector)\` when there is \`sin.(::Vector)\`?

**URL:** <https://discourse.julialang.org/t/what-is-the-future-of-sin-vector-when-there-is-sin-vector/677>\
**Category:** Internals & Design\
**Created:** [December 1, 2016, 5:28pm UTC](https://discourse.julialang.org/t/what-is-the-future-of-sin-vector-when-there-is-sin-vector/677 "2016-12-01T17:28:56Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [December 6, 2016, 2:17pm UTC](https://discourse.julialang.org/t/what-is-the-future-of-sin-vector-when-there-is-sin-vector/677/19 "2016-12-06T14:17:12Z")

</div>

I could use additional insight.  
On the one hand there is multidispatch and that had preferred

```
sin(x::TypeOfValue) .. end
sin(xs::Vector{TypeOfValue}) .. end
# and the uses
sin( value )
sin( values )

```

On the other one hand there is broadcasting and that prefers

```
sin(x::TypeOfValue) .. end
# and the uses
sin( value )
sin.( values )

```

Sometimes I do not know this:  
Is my `value` stands alone or is a vector of values or a fixed length array of values?  
In that case I would have been inclined to define `sin{T}( values::Vector{T} ) == sin.(values)`; but that is frowned upon (and, apparently, not costless even if it were accepted).

Is there a [relatively] new perspective that things that are a self-contained thing (as if length([thing…]) ==1) should not be used interchangeably with things that are a sequence of thing (as if length([thing…]) \> 1)?

---

_[View the full topic](https://discourse.julialang.org/t/what-is-the-future-of-sin-vector-when-there-is-sin-vector/677)._
