Re: Scala-Wicket Help and Advice

2011-01-05 Thread Juergen Donnerstag
Cool. May I ask which tools (IDE) you've been using and what your experience with these tools has been. -Juergen On Wed, Jan 5, 2011 at 2:34 AM, Jeremy Thomerson jer...@wickettraining.com wrote: On Tue, Jan 4, 2011 at 5:15 PM, richard emberson richard.ember...@gmail.com wrote: Dev Wicketers,

Re: Scala-Wicket Help and Advice

2011-01-05 Thread Martin Grigorov
On Wed, Jan 5, 2011 at 9:38 AM, Juergen Donnerstag juergen.donners...@gmail.com wrote: Cool. May I ask which tools (IDE) you've been using and what your experience with these tools has been. #scala suggests IDEA 10 + SBT plugin as the most mature one. -Juergen On Wed, Jan 5, 2011 at

Re: Scala-Wicket Help and Advice

2011-01-05 Thread richard emberson
No IDE, I use Vim. Also, my build environment is Ant-based using scalac and javac. Of course, what I was doing was porting from Java to Scala. To that end I've got some 400 Vim scripts that aid in the port. For instance, :g/final \([a-zA-Z]\+\) \([a-zA-Z]\+\)\[\]\s*=/s//val \2: Array[\1] =/g

more explicit handling of null values - yay or nay?

2011-01-05 Thread Igor Vaynberg
ive recently ran into a few cases where while implementing ajaxfallbacklink i forgot to test the passed in request target for null, causing NPEs when the app was accessed from browsers where ajax failed for whatever reason. with all this talk of scala recently i figured why not try and translate

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Martin Makundi
How would it simplify actual code? ** Martin 2011/1/5 Igor Vaynberg igor.vaynb...@gmail.com: ive recently ran into a few cases where while implementing ajaxfallbacklink i forgot to test the passed in request target for null, causing NPEs when the app was accessed from browsers where ajax

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Jeremy Thomerson
On Wed, Jan 5, 2011 at 11:44 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: ive recently ran into a few cases where while implementing ajaxfallbacklink i forgot to test the passed in request target for null, causing NPEs when the app was accessed from browsers where ajax failed for whatever

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Pedro Santos
Not simplifing (not complicating also), but making clear that an specific parameter is optional, it can prevent some runtime NPE by exposing in a very clear way at development time that some parameter may be null. On Wed, Jan 5, 2011 at 3:53 PM, Martin Makundi martin.maku...@koodaripalvelut.com

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Martin Makundi
We use only Ajax or non-Ajax components. No fallbacks. I think in the (near) future we don't really need fallbacks. Everything is javascript nowdays. Only mammooths are fallback. From that perspective it seems excess to add code to make something nice that is not going to exist for long.

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Jeremy Thomerson
On Wed, Jan 5, 2011 at 12:13 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: We use only Ajax or non-Ajax components. No fallbacks. I think in the (near) future we don't really need fallbacks. Everything is javascript nowdays. Only mammooths are fallback. From that perspective it

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Martijn Dashorst
Conversely you could create a RequiredT class that fails when a null is used, properly documenting that a parameter is required. Martijn On Wed, Jan 5, 2011 at 6:44 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: ive recently ran into a few cases where while implementing ajaxfallbacklink i

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Martijn Dashorst
I think this is one for 1.6, so we can flesh out any issues that arise from this style of programming. Martijn On Wed, Jan 5, 2011 at 6:44 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: ive recently ran into a few cases where while implementing ajaxfallbacklink i forgot to test the passed in

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Igor Vaynberg
we have adopted a required-by-default style, which is correct imho. only a few places in our code are allowed to return null and Optional is a simple way to document them directly in our code. -igor On Wed, Jan 5, 2011 at 10:36 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Conversely

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Martin Grigorov
I am one of those that use NoopAjaxRequestTarget. I like the approach. It is clear that the parameter may be null and you cannot forget to make the check. What is the reason to have both isNull/isNotNull and isSet/isNotSet? I think just isSet() is enough. It is quite easy to do if (!isSet())

Re: more explicit handling of null values - yay or nay?

2011-01-05 Thread Igor Vaynberg
They are there to aid readability. Sometimes opt.isNotSet is more readable the opt.isNull -igor On Jan 5, 2011 11:49 AM, Martin Grigorov mgrigo...@apache.org wrote: I am one of those that use NoopAjaxRequestTarget. I like the approach. It is clear that the parameter may be null and you

Re: Scala-Wicket Help and Advice

2011-01-05 Thread James Carman
Is this in IntelliJ IDEA? On Wed, Jan 5, 2011 at 6:04 PM, Gerolf Seitz gerolf.se...@gmail.com wrote: It's cmd+shift+G (OSX) and it works quite well ;) On Wed, Jan 5, 2011 at 11:55 PM, Justin Lee evancho...@gmail.com wrote: You can paste a java class into a .scala file and it'll autoconvert.

Re: Scala-Wicket Help and Advice

2011-01-05 Thread Gerolf Seitz
Is this in IntelliJ IDEA? yes On Wed, Jan 5, 2011 at 6:04 PM, Gerolf Seitz gerolf.se...@gmail.com wrote: It's cmd+shift+G (OSX) and it works quite well ;) On Wed, Jan 5, 2011 at 11:55 PM, Justin Lee evancho...@gmail.com wrote: You can paste a java class into a .scala file and

Re: Scala-Wicket Help and Advice

2011-01-05 Thread richard emberson
So there is an IDE that you can point at a directory tree and tell it to convert all of the Java files to Scala files. Does it do a 100% conversion, 90%, 50% or 10% (on average)? Do you have a link to a page documenting this feature? Thanks Richard On 01/05/2011 03:04 PM, Gerolf Seitz wrote:

Re: Scala-Wicket Help and Advice

2011-01-05 Thread James Carman
I've got to try it! On Jan 5, 2011 6:10 PM, Gerolf Seitz gerolf.se...@gmail.com wrote: Is this in IntelliJ IDEA? yes On Wed, Jan 5, 2011 at 6:04 PM, Gerolf Seitz gerolf.se...@gmail.com wrote: It's cmd+shift+G (OSX) and it works quite well ;) On Wed, Jan 5, 2011 at 11:55 PM, Justin

Re: Scala-Wicket Help and Advice

2011-01-05 Thread Cemal Bayramoglu
Richard, This would effectively result in Java code translated directly to Scala, pretty naively. From what you describe, you have already manually done much better than that. As you have already hinted at in your previous posts, one of the key points of this would be to take advantage of the