Re:Eclipse launches new language to cut down Java boilerplat...
by srik on Friday November 04, 2011 @08:02PM
(#3198288)
Granted Im not the target market, but Implicit returns do not seem like a good idea.
[ Parent
| on HN ]
Re:Eclipse launches new language to cut down Java boilerplat...
by famousactress on Friday November 04, 2011 @08:59PM
(#3198443)
Yeah, is there precedent for that? It looks fucking nutty. Can you do it in the middle of the function!? So odd. There's a lot of cruft in java, but I'm not sure the return statement is even on the list of things I'd bother attacking.
Re:Eclipse launches new language to cut down Java boilerplat...
by MichaelGG on Friday November 04, 2011 @09:19PM
(#3198496)
Functions in mathematics sets a good precedent for lack of a return keyword.
Where did you see that it says you can do it in the middle of a function? I understood it implicitly returns the last expression.
Re:Eclipse launches new language to cut down Java boilerplat...
by aidenn0 on Friday November 04, 2011 @11:06PM
(#3198760)
As far as a precedent, lisp does it that way, and it may be older than the existence of the return statement. Any language that lacks statements usually does it this way.
Re:Eclipse launches new language to cut down Java boilerplat...
by rayiner on Saturday November 05, 2011 @02:44AM
(#3199147)
Lisp, Dylan, Smalltalk, ML, Haskell, CoffeeScript, and Dart all have various levels of implicit return. It makes sense in a language where there are no statements, just expressions.
Generally code is written to not need to return from the middle of a function. This is only really inconvenient in loops, and at least Dylan, Lisp, and Smalltalk make some provision for an "early return."