   How to be polite in several programming languages
  People seem to be very rude to their compilers these days. They'll order their compiler to do something, then get angry and swear when the program doesn't work -- even though it's not even the compiler's fault! I think people need to be more polite to their compilers and interpreters. Who's with me?C:#define pleaseplease puts("Hello world!\n");Ruby:def please; yield; endplease {puts "Hello world!"}Common Lisp:(defmacro please x x)(please write-line "Hello world!")
  Where are the INTERCAL programmers when you need them?John B   ;  I completely agree. I always thought it was one of the most enterprising features of INTERCAL. I also thought the PLEASE DON'T GIVE UP statement was a nice way of helping the compiler through difficult programs. [smile]C++ solution?struct please_t{} please;struct thankyou_t{} thankyou;void f(int x){std::cout << x << std::endl;    }int main(){    std::cout << 5 << std::endl, please;    please, f(5), thankyou;}[grin]   ;  Computers has picked this rudeness too.... nothing like good ol days in 2001 when it would politely reply with "i'm sorry, Dave, i can't". No, these days this smartass yells "error" at you few hundreds times for every goddamn typo.Be polite to eachother.   ;  Pff fancy macros! Who needs polite macros anyways? I bought my compiler to be my slave and do what it's told. It's polite and precise to me and i'm rude to it. That's the way it's going to be!   ;  I'll be nice to my compiler when my compiler starts being nice to me.Quote:error C2146: learn how to write code, you freaking dumbass.;  Well, when you get error ICL079 PROGRAMMER IS INSUFFICIENTLY POLITE, don't come running to us! [wink]   ;  While writing a Smarty template, a coworker wanted to to call a PHP function, getUserName(), and have its result printed to the output stream. We could have written and registered a Smarty function, but we came up with the polite approach:{"please"|getUserName}This causes Smarty to call getUserName("please"), which PHP accepts without producing an error.   