[Dune-devel] Force usage of named arguments in dune_symlink_to_source_(tree, files)

Dominic Kempf dominic.r.kempf at gmail.com
Tue Jul 21 14:07:34 CEST 2015


Hey Christoph,

I just remembered the reason: Passing a list as a parameter to a macro
is quite a pain in cmake. CHeck
http://stackoverflow.com/questions/5248749/passing-a-list-to-a-cmake-macro
It happened to me, that all arguments after the first were ignored.
With the named arguments, we do not have any pitfalls for the user.
I am also generally in favor of named arguemnts, even if there is only one
argument.
Future extensions are easy to implement and the documentation is quite clear
about what data is expected.

Best,
Dominic

On Tue, Jul 21, 2015 at 1:51 PM, Christoph Grüninger <
christoph.grueninger at iws.uni-stuttgart.de> wrote:

> Dear Dune,
> I started to use dune_symlink_to_source_files and I am wondering why we
> force
> the useage of named arguments. In dune_symlink_to_source_files(FILES files)
> we always have to pass the "FILES" keyword.
> In general I like named arguments. But here there is nothing to
> destinguish,
> you can only pass some file names, nothing else.
>
> Same for dune_symlink_to_source_tree([NAME name])
>
> I would like to get rid of FILES all together. This might break user code
> but we can still make it into Dune 2.4 and still keep our promises, as the
> function is new in Dune 2.4.
> Or we do not force the usage of FILES and accept both ways.
>
> I am willing to provide a patch within the next 24 h.
>
> Bye
> Christoph
>
> --
> Je n'ai rien contre les étrangers, quelques uns de mes meilleurs amis
> sont des étrangers. Mais ces étrangers là ne sont pas de chez nous!
> [Agecanonix, Astérix - Le cadeau de César]
>
> _______________________________________________
> Dune-devel mailing list
> Dune-devel at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20150721/a83c60e2/attachment.htm>


More information about the Dune-devel mailing list