nasser / zajal

Experimental creative coding framework
MIT License
161 stars 10 forks source link

Better argument parsing #49

Closed nasser closed 12 years ago

nasser commented 13 years ago

Argument parsing has gotten complex, with optional arguments, heavy overloading and hash parameters. rb_scan_args is not enough. There should be a unified internal mechanism to deal with this.

nasser commented 12 years ago

A lot of 0.4 will be written in Ruby rather than C. Ruby handles argument parsing much better.

It could be that the C side exclusively defines private methods (rb_define_private_method) with fixed number of arguments and no hashes, and the Ruby side defines the clean public interface with optional arguments/hashes and calls these private methods.

nasser commented 12 years ago

This is indeed fixed in 0.4