DMD 1.035 and 2.019 releases

bearophile bearophileHUGS at lycos.com
Fri Sep 12 14:55:58 PDT 2008


Bruno Medeiros:
> it's not something I miss much. I understand it's use case, but
> I've never felt much need for it in any of the languages I've programmed.

If you use an IDE, it tells shows you the signature of the function/method, so such feature is less useful. But if you don't use an IDE, or you are using a dynamic language (where for the IDE is less easy to give help), they become quite useful, especially when you have several arguments, and several of them have a default value. So it's a form of documentation of the code, helps avoid some bugs, reduced the need to remember the exact signature if you don't have an IDE, etc. As most things if you overdo it, it may give you problems...

Note that for delegates/closures named arguments may give some problems, because you don't know at compile time what is the order of the arguments. To solve this problem in ShedSkin I have added an extra hidden uint or ulong argument to those closures, used as a bitmask of 32 or 64 bits, to tell the closure what are the arguments actually passed... :-) If you want more details I can explain. If there are more than 64 arguments you can add a second uint or ulong, etc.

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list