Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You should learn about WITH-OUTPUT-TO-STRING.

(string-downcase (string thing)) should be written (string-downcase thing)

The fdefinition trick is not a good one. Define the functions at compile-time, not at runtime.



> (string-downcase (string thing)) should be written (string-downcase thing)

I learnt this trick only after working on CL for a couple of years!


Maybe http://l1sp.org/search/designator will teach you a few more tricks and save you some time...


Nice. Today I learnt about the file position designator :)


I was originally using macros, but I prefer to use functions instead. I'll give it some thought, you may be right in this case.

And thanks for the (string-downcase thing) trick, I'll update that right now :)


Functions are good. Defining them at runtime with (setf (fdefinition ...) ...) is rarely good.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: