Zamansky: Learning Elisp #8

Mike Zamansky has published the latest video in his Learning Elisp series, Learning Elisp 8. It’s the second video about building a function to generate function header comments. This video continues the discussion of regular expressions by considering the rx macro and the related xr package.

The rx macro allows you to write a regular expression with a more functional notation. The xr package is the inverse of rx: it translates a regular expression in normal notation to the corresponding rx notation.

Some feel the rx notation is easier to use and understand than the traditional regular expression notation. In fact, Pay08 in the reddit discussion of Learning Elisp 7 complained that Zamansky didn’t mention rx, which he considers a must for dealing with regular expressions. I’ve never been able to warm up to using the rx macro and agree with Zamansky that it’s probably not worth learning because it applies only when writing Elisp and not to any of the other languages or utilities that have regular expressions. Zamansky suggests that the xr package may be useful for understanding regular expressions written in traditional notation but I don’t find the rx notation any easier to digest; your mileage may vary.

Finally, Zamansky considers the format function, which, as he says, is pretty much the same of C’s printf. With this video, Zamansky has discussed everything he needs to begin building his function header function.

The video is just short of 20 minutes so plan accordingly. It’s a nice introduction to the rx macro and related xr package so you should take a look at it if you aren’t already familiar with them. Don’t let my and Zamansky’s skepticism sway you; you may like them.

This entry was posted in General and tagged . Bookmark the permalink.