Hacker News new | ask | show | jobs
by elibarzilay 3333 days ago
You could have used the scribble reader (the @-expression syntax, not to be confused with the full documentation system). But you'd also then find that there is a more robust way to get what you implement with a simple definition:

    #lang at-exp racket
    (require racket/date)
    (define s string-append)
    (displayln @s{Current date&time: @(date->string (current-date) #t)})
1 comments

Yes! This is why I chose to use #@ instead of @, to avoid conflict with at-exp reader. As noted below by moron4hire, the @-exp reader is the better solution for this problem. I concentrated on providing an example of how to extend the reader, not on making an example of a useful or needed extension. I should have probably written this on top of the post...

Anyway, thanks for reading!