Fun facts: 1. Macro can have varied amount of arguments (like functions do) 2. Inside macro you can get env bindings by inspecting &env variable (there is also &form var, but it is boring) 3. You can define function and macro under the same name (symbol). It is useful for the cases when you want to run the macro(actually the function) with apply. 4. Macro can be used for performance sake. For example, you might want to move some of a heavy calculation to the compile time. For this you can implement a macro that does the work and inlines the result.
I really love the way you explain things. Not found a need for macros in my work, but it was good to see one built up. Thanks. It would be good to have a video about handling complex nested structures, may be including specter?
Fun facts:
1. Macro can have varied amount of arguments (like functions do)
2. Inside macro you can get env bindings by inspecting &env variable (there is also &form var, but it is boring)
3. You can define function and macro under the same name (symbol). It is useful for the cases when you want to run the macro(actually the function) with apply.
4. Macro can be used for performance sake. For example, you might want to move some of a heavy calculation to the compile time. For this you can implement a macro that does the work and inlines the result.
Thanks! Pinned this :)
Well done ! Enjoyed the interactive style of coding..
Love the intro ! And excellent content !
Thank you so much!
Awesome! one of the reasons why I wanted to learn Clojure.
Yeah its an awesome feature!
Nice intro to clojure macros.
Thanks!
Very nice explanation.. Looking forward to the next video. Cheers
Thanks a lot! :D
I really love the way you explain things. Not found a need for macros in my work, but it was good to see one built up. Thanks. It would be good to have a video about handling complex nested structures, may be including specter?
Good ideas thanks! Thanks for watching!
You are awesome.
So are you man!
Wow!
1. you can comment the entire function with #_
2. # with ` instead of gensym
Thanks
Thanks!!
Great example and explanation of Clojure macros!
You could look at transient data structures at some point. Just a suggestion))
Thank you!
Very nice and useful video! Thanks
Notice that "println" (unlike str) already surround args with space, so you can rid of spaces in your srings.
Rad! I never even realised
awesome! bookmarked :+1:
Thanks :)
Who's up for macros in Overtone with self writing music in artificial intelligence?
I haven't heard of overtone before this! It needs a video!! Thanks man