tag:blogger.com,1999:blog-1621051348177960641.post202709818091263212..comments2014-07-20T13:42:51.661+02:00Comments on McPolu: Java metaprogramming: the masses are ready.McPoluhttp://www.blogger.com/profile/08952117222771374308noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1621051348177960641.post-3363232584217872712007-08-07T15:50:00.000+02:002007-08-07T15:50:00.000+02:00nice blognice blogpromoteyourblogforfreehttps://www.blogger.com/profile/03313679716122928246noreply@blogger.comtag:blogger.com,1999:blog-1621051348177960641.post-71535951130605003732006-12-07T15:07:00.000+01:002006-12-07T15:07:00.000+01:00Also in C language we have macros due to the prepr...Also in C language we have macros due to the preprocessor, don't we?<br /><br />#include <stdlib.h><br />#define res(name,type,qu) type *name;\<br />if( (name=(type *)calloc(sizeof(type),qu))==NULL )\<br />{\<br />perror("Not enough memory");\<br />exit(EXIT_FAILURE);\<br />}<br /><br />int<br />main(int argc, char **argv)<br />{<br /> res(buf,int,4);<br /><br /> free(buf);<br />}<br /><br />preprocessed (and tidied a little), it becomes:<br /><br />int<br />main(int argc, char **argv)<br />{<br /> int *buf;<br /><br /> if( (buf=(int *)<br /> calloc(sizeof(int),4))<br />==((void *)0) ) {<br /> perror("Not enough memory");<br /> exit(1);<br /> }<br /> ;<br /><br /> free(buf);<br />}<br /><br />Well, it is not the same, because I can do this when I compile, but not while in run-time. My program at run-time couldn't "imagine" a class and create it.<br /><br />Almost half year ago, I read Paul Graham's Hackers and Painters, and there he speaks a lot about Lisp. He says among other things that most of the current languages (perl, python, ruby, java, etc.) are gradually taking ideas already developed with Lisp in 1958, although it's true that the Lisp syntax is absolutely horrible.<br /><br />More about him (some of his essays): http://www.paulgraham.com/Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1621051348177960641.post-25861440420736584782006-12-04T09:50:00.000+01:002006-12-04T09:50:00.000+01:00Hecho, gracias!Hecho, gracias!McPoluhttps://www.blogger.com/profile/08952117222771374308noreply@blogger.comtag:blogger.com,1999:blog-1621051348177960641.post-17749684109917570432006-12-03T21:48:00.000+01:002006-12-03T21:48:00.000+01:00En el código de ejemplo, has puesto la llamada con...En el código de ejemplo, has puesto la llamada con los campos en inglés y el resultado con los campos en español :P Cámbialo para que los lectores ingleses no se líen ;)<br /><br />-Walenzack.Anonymousnoreply@blogger.com