title: Julia multiple dispatch based on named arguments?
body: <p>I'm trying to create flexible function that would allow variety of uses:</p>
  
  <pre><code>save(image_url = "http://...")
  save(image_url = "http://...", title = "Cats", id = "cats")
  save(text = "Some text", comments = "Some comments")
  save(text = "Another text", title = "News", compression = true)
  </code></pre>
  
  <p>Basically it's 3 (or more) functions (<code>save_image_url</code>, <code>save_image_path</code>, <code>save_text</code>) combined .</p>
  
  <p>All of them have 3 same optional arguments <code>title</code>, <code>descriptions</code>, <code>compression</code>. And each can have any number of specific arguments.</p>
  
  <p>I don't want to use positional arguments because it would be hard to remember the order of arguments. Also, the first argument would have the same <code>String</code> type for <code>image_url</code> and <code>image_path</code> and <code>text</code>.</p>
  
  <p>Unfortunately it seems <strong>multiple dispatch is not working on named arguments</strong>. What are the patterns to handle such cases then?</p>
  
  <p>Not working implementation</p>
  
  <pre><code>function save(;
    image_url::   String,
  
    title::       Union{String, Nothing} = nothing,
    description:: Union{String, Nothing} = nothing,
    compression:: Union{Bool, Nothing}   = nothing
  )::Nothing
    nothing
  end
  
  
  function save(;
    image_path::  String,
  
    title::       Union{String, Nothing} = nothing,
    description:: Union{String, Nothing} = nothing,
    compression:: Union{Bool, Nothing}   = nothing
  )::Nothing
    nothing
  end
  
  function save(;
    text::        String,
    comments::    Union{String, Nothing} = nothing,
  
    title::       Union{String, Nothing} = nothing,
    description:: Union{String, Nothing} = nothing,
    compression:: Union{Bool, Nothing}   = nothing
  )::Nothing
    nothing
  end
  </code></pre>