gregtour / duck-lang

The Duck Programming Language
http://www.ducklang.org
109 stars 13 forks source link

Any plans to add optional arguments? Random numbers library? #8

Closed rpcope1 closed 9 years ago

rpcope1 commented 9 years ago

Hey, quick question, do you have any plans to add support for optional arguments? Also, I am considering building up a random numbers library (seed, rand and some other random number functions for convenience). Is this something else you might be interested in pulling in?

Best Regards, Robert

gregtour commented 9 years ago

Sure, optional arguments work just like normal arguments but if fewer arguments are passed in than parameters are specified, accessing the parameter value returns NIL (as it is undefined). Feel free to add anything else for libraries that you are interested in: math stuff, random numbers, file IO, networking, complex numbers.

Cheers, Greg

rpcope1 commented 9 years ago

Awesome! Thanks for the clarification.