[erlang-questions] [ANN] hackney 0.4.1 released

Anthony Ramine <>
Mon Jun 10 16:23:04 CEST 2013


-define(SHORTCUT(Method), Method(URL) -> hackney:request(Method, URL)).
?SHORTCUT(get).

To be honest I would just write each shortcut without any trick.

-- 
Anthony Ramine

Le 10 juin 2013 à 15:59, Benoit Chesneau a écrit :

> On Mon, Jun 10, 2013 at 3:51 PM, Anthony Ramine <> wrote:
>> Hello Benoit,
>> 
>> Why use a parse transform for such a tiny amount of boilerplate when you could have used a single macro taking a method name and generating the shortcut function?
>> 
>> Shortcuts work in the shell, parse transforms don't.
> 
> Parse transforms was the only thing coming in my mind at that time.
> Anything that could work in the shell would be better indeed. How
> would work this macro?
> 
> - benoit




More information about the erlang-questions mailing list