Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Cthun Newsgroups: comp.lang.java.programmer Subject: Re: Style Police (a rant) Date: Sat, 17 Sep 2011 19:36:47 -0400 Organization: Ph'nglui mglw'nfah Cthulhu R'lyeh wgah'nagl fhtagn Lines: 125 Message-ID: References: <681a23e5-2c6d-47e1-9625-4d63062210df@m5g2000vbm.googlegroups.com> <31be6d6b-3026-4767-a188-5f233a44cbf2@d18g2000yqm.googlegroups.com> NNTP-Posting-Host: p5NrdM8IIpNBthMl7jtF3Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: WinVN 0.99.12z (x86 32bit) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8112 On 16/09/2011 6:26 AM, Retahiv Oopsiscame wrote: > On Sep 15, 10:37 am, Cthun wrote: >> http://www.clojure.org/ >> http://try-clojure.org/ > > Eww! No thanks. *shrug* Suit yourself. But don't knock it until you've tried it. >> [calls me a liar] > > No! None of the nasty things that you have said or implied about me > are at all true. What?? Where did I call you a liar? >> Java finally is adding something called "try-with-resources". If >> Java had had macros we wouldn't have needed to wait. He could have >> written a try-with-resources macro built around regular try. Or even >> if he didn't have the chops for macro writing himself, as soon as >> there was much demand for try-with-resources someone would have made >> it available as a library in short order. But instead, the Java >> community had to wait until Sun/Oracle got their act together and >> added it. > > And it works, instead of being buggy as hell and prone to name capture > issues, and Java codebases aren't chock full of idiosyncratic macro > invocations but are instead pretty standardized, so any skilled Java > professional can easily read any of that code and maintain it. Lisps tend to accrue fairly standard libraries of third-party macros everyone learns to recognize. And of course you usually have access to the macro's source. >> Macros mean not having to wait for the implementation vendors for new >> language features. It means maybe getting esoteric ones the vendors >> don't see enough demand for to write themselves. It also means being >> able to easily write mini-compilers to convert a problem-domain >> language, such as an expressive math notation, into the underlying >> language. So you can do something like (math x^2 + 32) and get back a >> Polynomial object or whatever that can be called like a function with >> various values of x and also subjected to analytic methods. And yes, >> that's infix notation inside the hypothetical math macro. > > Sounds like Lisp easily turns into a Tower of Babel where no-one can > understand anyone else's code. The ability to define functions or classes already suffices to allow programmers to turn a language into a Tower of Babel, yet nearly all languages allow user-defined functions and/or classes in some form or another, and ones that allow neither are considered archaic and crippled. >> C's are much less clean because they do nothing to help avoid symbol >> capture and they operate on text rather than the abstract syntax tree. > > Something familiar in how you write. You remind me of someone I had a > very long argument with here, long ago. Appropriately, his name was > "Bent". Ad hominem noted. Get back to me when you have a real argument to make. >> Sort of, minus the klunky kludge part. Gensyms and qualified symbols can >> be used for this type of thing. > > "Klunky kludge" is obviously in the eye of the beholder, if you think > those don't qualify. Perhaps. >>> Most operator precedence rules you'll need will have been ingrained in >>> grade school math class, and you can always *elect* to parenthesize >>> when you want to be sure of a particular order of execution and don't >>> remember the precedence rule (or it goes the wrong way for your needs >>> in that case). >> >> Why leave any doubt? > > There *is* no doubt, in most cases, for anyone who's graduated from > kindergarten. Quick quiz: without referring to the JLS, other Sun/Oracle docs, Wikipedia, or Google, which has precedence: the cast operator or the dot (method invocation) operator? >> Besides, fully-parenthesized helps make the source code be close to a >> directly readable version of the abstract syntax tree. > > "Readable" is obviously also in the eye of the beholder. :P Perhaps. Verbose, on the other hand, isn't, and Java is quite verbose at any given level of expressiveness compared to, especially, Lisps. >> And that makes it easier for the macro processor to work, and for >> the coder to reason about their macros. > > And now we're back to this. To satisfy your macro yen, you make the > whole rest of the language suck. I don't think so. >>> Without syntax, you don't even have a language, just a formless soup. >> >> [calls me a liar] > > No! None of the nasty things that you have said or implied about me > are at all true. Whaaaaa????? >>> Merely being unLispy would be a good thing. >> >> [calls me a liar] > > No! None of the nasty things that you have said or implied about me > are at all true. WTF?!?!?! >>> The problem is that it's COBOLy, BASICy, and borderline INTERCALy. >> >> This much is true. > > A single point we agree on! Wow. :P No need for sarcasm. It means you're beginning to learn.