[PATCH] vala: Add bindings for libpulse-simple

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alexander,

I'd like to merge this patch (sorry that it has taken so long), but i
have one question:

On Mon, 2012-02-06 at 21:46 +0100, Alexander Kurtz wrote:
> +namespace PulseAudio {
> +       [Compact]
> +       [CCode (cheader_filename="pulse/simple.h", cname="pa_simple", cprefix="pa_simple_")]
> +       class Simple {
> +               public Simple(string? server = null, string? name = null, Stream.Direction dir, string? dev = null, string stream_name, SampleSpec ss, ChannelMap? map = null, Stream.BufferAttr? attr = null, out int error = null);

Do the default arguments really work or make sense? I don't know Vala
very well, but in other languages that I know, arguments with a default
value have to be grouped to the end of the argument list, because
anything else is ambiguous, or at least confusing to the reader.

For example:

Simple(dir, "foo", sample_spec);

>From the argument types it's possible to deduce what the programmer
probably means with the dir and sample_spec arguments, but is "foo" the
dev argument or the stream_name argument? Since dev is optional and
stream_name is mandatory, "foo" probably is the stream name, but does
the vala compiler really do this kind of deduction?

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux