Re: Generating functions from data

2013-11-19 Thread John D. Hume
After some experience with excessively meta-programmed Ruby apps, I generally try to design an API that is as clean (or almost) as what I'm tempted to generate and avoid the metaprogramming. For example (api/get-user-by-id 123) is only slightly nicer than (api/get-by-id :user 123), so if the

Re: Generating functions from data

2013-11-19 Thread Jeremy Heiler
On Tue, Nov 19, 2013 at 11:44 AM, John D. Hume duelin.mark...@gmail.comwrote: After some experience with excessively meta-programmed Ruby apps, I generally try to design an API that is as clean (or almost) as what I'm tempted to generate and avoid the metaprogramming. For example

Generating functions from data

2013-11-18 Thread Jeremy Heiler
I am interested in what you think about generating functions at compile time (with a macro) from data. The specific use case I am thinking about pertains to libraries for large web services with a lot of endpoints. A cost-benefit analysis could probably be done for what size is appropriate, but

Re: Generating functions from data

2013-11-18 Thread Michael-Keith Bernard (SegFaultAX)
Hi Jeremy, There are a number of existing implementations of what you're describing, the most well known of which is the Web Services Description Language (WSDL)http://en.wikipedia.org/wiki/Web_Services_Description_Languagecommonly used with SOAP http://en.wikipedia.org/wiki/SOAP. A WSDL file

Re: Generating functions from data

2013-11-18 Thread Jeremy Heiler
On Mon, Nov 18, 2013 at 9:35 PM, Michael-Keith Bernard (SegFaultAX) mkbernard@gmail.com wrote: There are a number of existing implementations of what you're describing, the most well known of which is the Web Services Description Language (WSDL)

Re: Generating functions from data

2013-11-18 Thread Jeremy Heiler
On Mon, Nov 18, 2013 at 7:48 PM, Jeremy Heiler jeremyhei...@gmail.comwrote: I am interested in what you think about generating functions at compile time (with a macro) from data. The specific use case I am thinking about pertains to libraries for large web services with a lot of endpoints. A