I don't know, but, often get irriated by the usage of "closures" when it means "anonymous function/expression". > The term closure is often mistakenly used to mean anonymous function. This is probably because most languages implementing anonymous functions allow them to form closures and programmers are usually introduced to both concepts at the same time. An anonymous function can be seen as a function literal, whil…
Eclipse launches new language to cut down Java boilerplate - Extend
101–110 of 229 posts
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#102Very cool. One nitpick (unless the video glossed over the details) is that the double arrows in the video for "personToGreet" looks weird because it's not a basic key on the keyboard.
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#103Re: Eclipse launches new language to cut down Java boilerplate - Extend
#104Earlier quoted context omitted.
Ruby does not get rid of semicolons or brackets. Heck, you can write Java/C++ style curly brace code in Ruby if you wanted.
Of course, if you did write Java/C++ style curly brace code in Ruby, those of us who like Ruby would bring out the pitchforks.
The fact is that the visual style of a language is trivial to get used to. Breaking my text editor is a real issue though.
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#105Re: Eclipse launches new language to cut down Java boilerplate - Extend
#106Granted Im not the target market, but Implicit returns do not seem like a good idea.
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 boilerplate - Extend
#107Earlier quoted context omitted.
Optional parenthesis if no argument is given was already a feature of at least pascal in the seventies. All those new "cool and innovative" languages are just rediscovering it after almost a decade of everything with C syntax. Not that it's bad or anything, it's just my OCD tingling.
IMHO, it's less readable, and more ambiguous. Is it a variable or a function? Who knows!
var x = 1
to (not great code, but illustrative of the point) private var _x: Int = 1
def x: Int = _x
def x_= (value: Int) = {
if (value > 1337)
throw new ArgumentOutOfRangeException()
_x = value
}
The convention is to use empty parents after zero-argument functions that have side effects, much like the ! in Scheme.Re: Eclipse launches new language to cut down Java boilerplate - Extend
#108The fact that Xtend can be easily translated to Java source code is a big sign that it probably won't have any dramatic impact on your productivity. I think the comparison that has been made between Xtend and Coffeescript is most accurate. Xtend will likely be more pleasant to work in than Java, but it won't be a game changer in terms of what you can accomplish with it. Still many people are happy with Coffeescript, and if Xtend does thing right many people might be happy with it as well.
And, I'm pretty sure David Pollak is the only Scala evangelist who is worried Scala won't or shouldn't overtake Java. Everyone else seems to be committed to making Scala a better and better out-of-the-box experience, and there continues to be initiatives and commercial investment in improving things like IDE support, documentation, coding standards, training opportunities, and more.
Re: Eclipse launches new language to cut down Java boilerplate - Extend
#109Earlier quoted context omitted.
You still have a dot in there! greetABunchOfPeople List people people do _ sayHello println
You left a type in there! greetABunchOfPeople people people do _ sayHello println
greetABunchOfPeople = mapM_ (putStrLn . sayHello)
Explanation:mapM_ is a function that takes two arguments.
mapM_ lambda list
It calls lambda on each element on list.In the greetABunchOfPeople definition, notice we only gave mapM_ 1 argument instead of 2. That means greetABunchOfPeople would have to take an extra argument for the call to execute.
greetABunchOfPeople $MISSING$ = mapM_ (putStrLn . sayHello) $MISSING$Re: Eclipse launches new language to cut down Java boilerplate - Extend
#110Oh, it looks like Xtend is to Java as Coffeescript is to Javascript. Although I'm sceptical about it compiling to Java source. Java seems to be going through a period of experimentation, and alternative Java-like and JVM languages. Interesting times.
It is also great for using with Android/GWT. Scala can be both used with Android[1] and GWT[2], but it is not a walk in the park. It seems like a great gateway drug for Scala. [1] https://github.com/danielribeiro/HelloScalaOnAndroid [2] http://news.ycombinator.com/item?id=3198154
The major downsides which are super troublesome are that it takes 2 minutes to build each time - even for trivial changes and I have to debug the old school way with messages.