PROPOSAL: Auto-assignment Parameters (original) (raw)
Mark Mahieu markmahieu at googlemail.com
Sat Mar 28 05:11:31 PDT 2009
- Previous message: PROPOSAL: Auto-assignment Parameters
- Next message: PROPOSAL: Auto-assignment Parameters
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2009/3/28 Marek Kozieł <develop4lasu at gmail.com>
W dniu 28 marca 2009 01:11 użytkownik Mark Mahieu <markmahieu at googlemail.com> napisał: > That's a good example, but to me it's a nice illustration of why that > approach doesn't work very well for return values, especially when there's > additional logic in the method body. > 'return;' already has very clear semantics in Java, and this would add too > much confusion, and complexity, for there to be a net gain. > Mark > >
But this can be even bigger problem with input parameters, while they are not able to be placed in synchronization block in given syntax (except synchronization over method). While with output parameter this can be quite easy handled. -- Pozdrowionka. / Regards. Lasu aka Marek Kozieł http://lasu2string.blogspot.com/
In either case, if you need to do something more sophisticated than straightforward assignment (or, arguably, return), it would be better make that explicit in the method body so that it's obvious to anyone reading the code. Regards,
Mark
- Previous message: PROPOSAL: Auto-assignment Parameters
- Next message: PROPOSAL: Auto-assignment Parameters
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]