Well-known languages which do this include Haskell and Rust (where it's also useful). In Rust, you can write things like:
// Generate an appropriate default value for a type.
// Here, this will create an empty vector of String.
let my_vec: Vec<String> = Default::default();
// Parse JSON into the specified type.
let numbers: Vec<u32> = serde_json::from_str("[1, 2, 3]")?;
I think there may be ways to do something similar with C++ template metaprogramming and partial specialization, and I wouldn't be surprised if some of the ML family supported something similar using "modules". (But I don't really understand ML modules, so don't quote me on that.)It's a great feature, and I would love for more strongly-typed languages to support it.