When reading codes, we will find some functions like this.
g_spawn_async(NULL, new_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
I think nobody can figure out what is the meaning of every parameter. In order to understand the code, we have to find the declaration of the function.
gboolean g_spawn_async (const gchar *working_directory,
gchar **argv,
gchar **envp,
GSpawnFlags flags,
GSpawnChildSetupFunc child_setup,
gpointer user_data,
GPid *child_pid,
GError **error);
How can we call a function like the following format in C++?
g_spawn_async(working_directory=NULL,
argv=new_argv,
envp=NULL,
flags=G_SPAWN_SEARCH_PATH,
child_setup=NULL,
user_data=NULL,
child_pid=NULL,
error=NULL);
I think this one will be more readable and I can understand the code without looking for the declaration of the function.
I know Python can do this. How can C++ do this?