These are chat archives for rust-lang/rust

Aug 2016
Aug 19 2016 09:27
This message was deleted
Robert Deusser
Aug 19 2016 15:46
When would someone use a macro over a function?
an example
Aug 19 2016 15:53
@iamthemuffinman when something is expressed as syntax, instead of data transformation.
Robert Deusser
Aug 19 2016 15:56
@Bastacyclop So you can't do that what he did with a function?
Thomas Koehler
Aug 19 2016 15:57
with a function you will get the panic location inside the function
with the macro you get the panic location where the macro is expanded
Robert Deusser
Aug 19 2016 15:57
That makes sense.
Peter Atashian
Aug 19 2016 20:36
@iamthemuffinman I use macros in places to make the code simpler such as when defining types so I don't have to do a bunch of boilerplate