Talk:Apache Groovy
Software: Computing Start‑class | |||||||||||||
|
Computing Start‑class | ||||||||||
|
Groovy Paradigms
Should "functional" be added to the list of Groovy Paradigms? It certainly seems to fit, given Groovy's extensive list of functional constructs. —Preceding unsigned comment added by 129.82.29.25 (talk) 14:30, 1 August 2008 (UTC)
Explanation of the Name "Groovy"
- In slang and informal language, "groovy" is an adjective describing an unspecified fashionable or desirable quality. It can also be used as a generally positive exclamation. It originated in Britain, and largely remains a British word. "Groovy" has slightly outdated connotations in recent times, although it can still be used in everyday speech.
I removed this from the article because wikipedia is not a dictionary and the definition has no relation with the programming language discussed in the article. -- Taku 02:47, Apr 25, 2005 (UTC)
I agree, and I removed the following which is even less desirable -- MarkBrooks 03:12, 13 October 2005 (UTC)
- Groovy is an adjective to describe the state of being 'cool', 'hip', or generally 'awesome'
- The lack of a sense of irony or tongue-in-cheek fun is a sad thing. The "definition" reflects the spirit of the originators of the language, and plays a valuable part in the encyclopedia entry. It's there not because Wikipedia is a dictionary but because we learn more about James Strachan and friends by seeing what the name means. We don't need the definition removed; we need it enhanced by an explanation of why they picked it. Webmink 05:18, 13 October 2005 (UTC)
- You want grins and giggles, go read the Encyclopaedia Britannica. Seriously though, I came to this article as a user seeking information, and I felt that the lead-in as written didn't add anything to my knowledge, detracted from the article's tone, and was simply an unnecessary distraction. Maybe somebody who didn't know what the word "groovy" meant would feel differently. BTW, back when this word was in common usage, I don't think "awesome" would have been used in quite the same way. Maybe you could quote the developer's reasons for choosing that name, to put the definition in context? -- MarkBrooks 09:22, 16 October 2005 (UTC)
- Attempts by several people to indicate the colloquial meaning of the term have now been discarded, not because they were bad or excessive like the original attempt (which I agreed was wrong) but simply because "wikipedia is not a dictionary". . Clearly there's demand for at least a nod towards the colloquialism. Are there any other editors of this page who wish to express an opinion? Webmink 03:43, 31 October 2005 (UTC)
- Personally, I think the original definition (the one at the top of this section) was superior to subsequent attempts and wouldn't object to its inclusion, particularly if a connection could be made with the choice of name for the programming language. Otherwise maybe a disambiguation page would be a better idea? -- MarkBrooks | Talk 01:36, 1 November 2005 (UTC)
- Since I know it would be hard to write a full article about the adjective groovy, I added the wiktionary link to satisfy those who just want a definition. Bkkbrad 12:15, 2 November 2005 (UTC)
- Cool, thanks. -- MarkBrooks | Talk 17:29, 3 November 2005 (UTC)
Features of Groovy compared to those of Java
I believe Java does have native syntax for arrays. BDKosher 21:05, 12 February 2006 (UTC)
yes, it has --217.86.138.17 12:55, 31 October 2006 (UTC)
String[] list = { "Rod", "Carlos", "Chris" }; List<String> shorts = new ArrayList(); for (String item : list) { if (item.length() <= 4) { shorts.add(item); System.out.println(item); } }
and the syntax comparison is neither side-by-side nor representative.
To be fair, the Groovy code is using a List and not an Array (which Groovy supports, as well). However, also to be fair, the Groovy code doesn't create a second List of the short Strings and then print them. It just prints them as it finds them. The above example gets rid of the iteration through the second List, but still instantiates it and adds Strings to it.
I propose that the Java code be changed to the following:
class Filter { public static void main(String[] args) { List<String> list = Arrays.asList("Rod", "Carlos", "Chris"); for (String item : list) { if (item.length() <= 4) { System.out.println(item); } } } }
Jerri Kohl 22:16, 4 May 2007 (UTC)
History of Groovy
Groovy was originally conceived in 2003(?) as a more Ruby-like language for the Java Virtual Machine. Groovy Beta 1.0 announcement on James Strachan's blog —The preceding unsigned comment was added by 66.138.72.243 (talk) 03:51, 3 January 2007 (UTC).
Redirect
Is there any particular reason why this article is at "Groovy (programming language)" rather than just at "Groovy", since the latter is just a redirect here? -- timc talk 18:36, 21 March 2007 (UTC)
- I don't see the point as well. Will create a disambig page.--sin-man 04:23, 3 April 2007 (UTC)
Markup Language support--don't see how this makes Groovy special.
How is markup language support any more special in Groovy than any other language? The example provided can be accomplished in a whole array of other languages using their standard libraries. This seems a pretty weak example to demonstrate a differentiating feature. Can something more robust be demonstrated that truly differentiates Groovy markup support from other languages?
Ehogberg (talk) 19:45, 29 January 2008 (UTC)
- The language that Groovy intends to be a complement for/alternative to is Java. As a matter of fact, Groovy was designed to be easy to learn for Java programmers, while offering the more powerful features found at the time in other scripting/dynamic languages such as Python and Ruby. In this context, maybe the markup example should also be provided in Java? Ogourment (talk) 16:42, 11 February 2008 (UTC)
- I added a Java example (using the XML DOM libraries provided with the Sun JDK); if I'm understanding correctly what's supposed to be special about markup languages in Groovy, it's that there's an inline syntax for building documents that A) doesn't care what format the document will ultimately be in, as long as it can be expressed as a DOM tree, and B) doesn't require explicit method calls for setting up each element and attribute. evildeathmath 16:50, 16 July 2008 (UTC)
Upon further reflection, I am tempted to add this version to the article as well:
System.out.println("<workbook>");
System.out.println(" <worksheet caption=\"Employees\">");
System.out.println(" <row fname=\"John\" lname=\"McDoe\"/>");
System.out.println(" <row fname=\"Nancy\" lname=\"Davolio\"/>");
System.out.println(" </worksheet>");
System.out.println(" <worksheet caption=\"Products\">");
System.out.println(" <row id=\"sku34510\" name=\"Veeblefeetzer\"/>");
System.out.println(" <row id=\"sku3a550\" name=\"Prune Unit Zappa\"/>");
System.out.println(" </worksheet>");
System.out.println("</workbook>");
On the one hand, it's pedantic, silly, and poor programming practice; on the other hand, it's likely what 9 out of 10 programmers would do if all they needed was a short XML snippet. evildeathmath 16:58, 16 July 2008 (UTC)
DOM Compliance
The article refers to an inline DOM syntax linked to DOM which is the w3c standard DOM. What i'm getting at is that DOM is an API standard whereas Groovy appears to implement it's own API, or rather allow xml construction using language features. Dylan.star (talk) 14:45, 3 September 2008 (UTC)
Groovy's syntax can be made far more compact than Java
Are you serious? The shown examples just saves 6 or 8 characters. This is a bit more compact but not far more compact. --87.78.132.86 (talk) 09:36, 2 February 2009 (UTC)