# Why does \`write\` not have \`!\` in its name?

**URL:** https://discourse.julialang.org/t/why-does-write-not-have-in-its-name/28201
**Category:** General Usage
**Tags:** question
**Created:** [August 30, 2019, 9:47am UTC](https://discourse.julialang.org/t/why-does-write-not-have-in-its-name/28201 "2019-08-30T09:47:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)
#### Post date: [August 30, 2019, 9:47am UTC](https://discourse.julialang.org/t/why-does-write-not-have-in-its-name/28201/1 "2019-08-30T09:47:48Z")

</div>

[Julia style guide](https://docs.julialang.org/en/v1/manual/style-guide/#Append-!-to-names-of-functions-that-modify-their-arguments-1) suggests appending an `!` to the function’s name. I am curious about why `write` does not follow this guide? Isn’t `write` modifying `io` or `filename`? What is the boundary of distinguishing modifying or not?

```julia
write(io::IO, x)
write(filename::AbstractString, x)

```

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [August 30, 2019, 9:53am UTC](https://discourse.julialang.org/t/why-does-write-not-have-in-its-name/28201/2 "2019-08-30T09:53:27Z")

</div>

I think it is implicitly understood that `write` has side effects. Cf `rand`.

(Note that `write` of course does not modify `filename::AbstractString`, just the contents of the file it refers to).

---

<div class="post-metadata">

### Author: ![singularitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/singularitti/32/17678_2.png) [@singularitti](https://discourse.julialang.org/u/singularitti)
#### Post date: [September 13, 2019, 5:06am UTC](https://discourse.julialang.org/t/why-does-write-not-have-in-its-name/28201/3 "2019-09-13T05:06:24Z")

</div>

I found [JuMP.jl style guide](http://www.juliaopt.org/JuMP.jl/dev/style/#Use-of-!-1). It agrees with you since `set_name` and `add_constraint` are clear that modification is taking place.
