# Doubt about function in Julia

**URL:** <https://discourse.julialang.org/t/doubt-about-function-in-julia/85492>\
**Category:** New to Julia\
**Tags:** question, functions\
**Created:** [August 8, 2022, 5:01pm UTC](https://discourse.julialang.org/t/doubt-about-function-in-julia/85492 "2022-08-08T17:01:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafael\_Brus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael_brus/32/23767_2.png) [@Rafael\_Brus](https://discourse.julialang.org/u/Rafael_Brus)\
**Post date:** [August 8, 2022, 5:01pm UTC](https://discourse.julialang.org/t/doubt-about-function-in-julia/85492/1 "2022-08-08T17:01:46Z")

</div>

Hello guys, I’m studying Julia and I had a doubt in the following module of [SearchLight.jl](https://github.com/GenieFramework/SearchLight.jl/blob/master/src/Serializer.jl).

```julia
module Serializer

import SearchLight

function serialize end

function deserialize end

function serializables end # return Vector{Symbol}

include("../serializers/JsonSerializer.jl")

end

```

How the following function syntax works: `function func_name end`

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 8, 2022, 5:42pm UTC](https://discourse.julialang.org/t/doubt-about-function-in-julia/85492/2 "2022-08-08T17:42:18Z")

</div>

> [@Rafael\_Brus](#):
>
> How the following function syntax works: `function func_name end`

It declares a generic function but defines no methods for it:

```julia
julia> function foo end
foo (generic function with 0 methods)

```

Typically, the only reason to do this is to [attach a documentation string](https://docs.julialang.org/en/v1/manual/documentation/#Functions-and-Methods) to the function (rather than to any particular method). I don’t see why they did it in SearchLight.jl (where the functions have no docstrings), except maybe as a form of code documentation or as a placeholder for them to add docstrings later.
