Better HN
topnewbestaskshowjobs
Log inSign up

TenDecigrams

6 karma · joined May 1, 2015 (11y ago) · 2 submissions

Submissions

comment 11y ago · link · parent

Edit: Ohhh! I see! The message isn't evaluated until after! Got it.

I don't understand why this is special?

Why can't you rewrite log.debug to include the check?

    func debug(m string) {
        if log.isDebugEnabled() {
            log.debug(m);
        }
    }
What makes macros special in this case?

comment 11y ago · link · parent

I wonder if Elon and the owner of SolarCity will get in touch. Oh wait... ;)