atom feed40 messages in org.codehaus.groovy.userRe: [groovy-user] Acceptable Placemen...
FromSent OnAttachments
Randall R SchulzDec 3, 2007 3:41 pm 
Stand TrooperDec 3, 2007 4:03 pm 
Randall R SchulzDec 3, 2007 4:07 pm 
Stand TrooperDec 3, 2007 4:34 pm 
Russel WinderDec 3, 2007 9:46 pm 
Russel WinderDec 3, 2007 9:49 pm 
Charles Oliver NutterDec 3, 2007 9:52 pm 
Randall R SchulzDec 3, 2007 10:10 pm 
Jochen TheodorouDec 4, 2007 5:59 am 
Charles Oliver NutterDec 4, 2007 10:59 am 
Jochen TheodorouDec 4, 2007 11:51 am 
Smith, Jason, CTR, OASD(HA)/TMADec 4, 2007 1:10 pm 
Charles Oliver NutterDec 4, 2007 1:24 pm 
Charles Oliver NutterDec 4, 2007 1:29 pm 
Jochen TheodorouDec 4, 2007 1:54 pm 
Smith, Jason, CTR, OASD(HA)/TMADec 4, 2007 2:33 pm 
Jochen TheodorouDec 4, 2007 2:44 pm 
Charles Oliver NutterDec 4, 2007 2:56 pm 
Smith, Jason, CTR, OASD(HA)/TMADec 5, 2007 6:35 am 
Charles Oliver NutterDec 5, 2007 10:16 am 
Smith, Jason, CTR, OASD(HA)/TMADec 5, 2007 10:29 am 
Jochen TheodorouDec 5, 2007 5:45 pm 
Jochen TheodorouDec 7, 2007 8:31 am 
Randall R SchulzDec 7, 2007 8:37 am 
Jochen TheodorouDec 7, 2007 8:49 am 
Guillaume LaforgeDec 7, 2007 9:01 am 
Jochen TheodorouDec 7, 2007 9:14 am 
Guillaume LaforgeDec 7, 2007 9:16 am 
Randall R SchulzDec 7, 2007 9:22 am 
Guillaume LaforgeDec 7, 2007 9:28 am 
Charles Oliver NutterDec 7, 2007 10:09 am 
Charles Oliver NutterDec 7, 2007 10:11 am 
Randall R SchulzDec 7, 2007 10:18 am 
Jochen TheodorouDec 7, 2007 10:31 am 
Charles Oliver NutterDec 7, 2007 12:23 pm 
Randall R SchulzDec 7, 2007 12:37 pm 
Charles Oliver NutterDec 7, 2007 1:35 pm 
Randall R SchulzDec 7, 2007 1:40 pm 
Gavin GroverDec 7, 2007 11:49 pm 
Jochen TheodorouDec 8, 2007 3:40 am 
Subject:Re: [groovy-user] Acceptable Placement of default: Within Switch?
From:Russel Winder (russ@concertant.com)
Date:Dec 3, 2007 9:49:39 pm
List:org.codehaus.groovy.user

On Mon, 2007-12-03 at 16:07 -0800, Randall R Schulz wrote:

On Monday 03 December 2007 16:03, Stand Trooper wrote:

Randall, The second example is correct. It doesn't matter that it's in a Grails Controller, or shouldn't... I'm loading up my ide now. I ran all examples in Java and Groovy (4 examples run total) and only the default first causes a problem (lexer issue?)

Default in Java means nothing else is, generally accepted, to be after it. The correct placement is always at the end of the switch statement. And Groovy does require the default to be at the end of the switch.

Well, I contend:

a) This is in itself an unjustified and unjustifiable constraint.

I don't agree, it is just that the semantics of switch in Groovy is not the same as it is in Java.

b) Java does not impose this restriction.

True.

So it should be relaxed in Groovy.

I don't think this syllogism works.

-- Russel. ==================================================== Dr Russel Winder Partner

Concertant LLP t: +44 20 7193 9203 41 Buckmaster Road, f: +44 8700 516 084 London SW11 1EN, UK. m: +44 7770 465 077