On 2014-03-01 15:19:29 +0000, Jacob Carlborg <d...@me.com> said:

On 2014-02-27 21:43, Walter Bright wrote:

This comes up now and then. The problem with it is it makes function
overloading a near impossibility to untangle.

We could quite easy add support for named parameters but still require using the same position of the arguments. I don't know if those wanting named parameters would be satisfied with this though.

I did implement something like that in DMD a while ago as an experiment. See the comments below that commit:

https://github.com/michelf/dmd/commit/673bae4982ff18a3d216bc1578f50d40f4d26d7a

Walter pointed out that it should work for template arguments. I agreed, devised a plan to restructure the whole thing to be less of a hack and make it works for templates, then I had no more time to put on this. :-(

This planned restructuring did lead to a transition to type-checked arrays within DMD though, so the effort wasn't completely wasted.


--
Michel Fortin
michel.for...@michelf.ca
http://michelf.ca

Reply via email to