As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
CoffeeScript is so cool. If there is any language use the coffee syntax but running on jvm, like groovy, scala?
Python's syntax is not cool. i can't use so many xx,self in my code, that's ugly.
Yes. CoffeeScript compiles into plain old JavaScript, which can be executed by modern JVMs (v6+).
Incidentally, it's funny that you contrast the syntax of Python, since both languages depend on whitespace as syntax (which is a controversial topic!). Anyhoo, happy hacking!
[Edit] Here is a more useful introduction to using JavaScript on the JVM.
While it is not specifically Coffeescript, Mirah is a JVM language that compiles directly to JVM bytecode or Java source and requires no runtime library to run. Which makes it analogous to the way most people use Coffeescript. That is, avoiding the ugly semantic and syntactic elements of Javascript. Mirah is statically typed, yet its syntax borrows heavily from Ruby (Mirah is Javanese for Ruby).
While the language itself is still in its infancy, it's very possible to use it today. I've done most of my University homework using it where writing Java directly would have otherwise been required. I'm also poking at using it to develop for Android.
It does not look like Coffeescript, but it has the same goals and you may find it a good fit. Not to mention that Coffeescript syntax is also inspired somewhat on Ruby so the two share a common ancestor.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I want to make a Java game engine that would be simple to use mainly for it would have a higher level language interpreter. I though about using Lua language with the LuaJ intertpreter, but I've got some really slow results...
I need suggestions for what other Lua-like languages (With a Java interpreter available) exist that (with an interpreter) could execute faster (than LuaJ) on my Java application.
In the domain of game programming, Java itself is considered slow. I would suggest that you can start with code generation facility built on top of Java. I have worked extensively on Drools , Groovy and similar DSLs and can vouch they are "slow" for even a typical enterprise app. One problem is the dynamic interpretation layer built over java. You can see the typical performances in this comparison study at http://www.slideshare.net/michael.galpin/performance-comparisons-of-dynamic-languages-on-the-java-virtual-machine
If you can work on creating a language which generates code before compiling, you will get best of both world. This doesn't mean you will need to know compiler theory stuff from day one. You can simply create utility functions in Java which you can distribute as client library. However, you will need to know Reflections thoroughly to approach the solution in this way. As nobody changes the code in a running production server, you will be perfectly fine.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Interpreted languages are nice, I can write some quick, prototypical code (i.e. using an interactive shell) for the purpose of exploration before delving into production level code.
What is the best approach for this with Java? Currently I'm creating Maven projects with Eclipse, and exploring things in my test infrastructure using JUnit... but this is less then ideal.
You can also check out Eclipse's Scrapbook Page:
Menu>File>New>Other>(search for)Scrapbook Page
Why not use something like BeanShell ? It's a scripting solution for Java and offers a console-based interactive scripting environment.
Here's the quick start guide. Note that you can also start a BeanShell console from within Maven.
I've picked BeanShell here since it's the closest thing to Java, but interactive. You could pick another console-based JVM language such as Scala, Jython etc. They're more removed from standard Java since they're different languages, but still offer interoperability with your standard Java components.
You might want to try out JRebel for quick code tweaking. Or if you are into web development, check Play framework.
http://zeroturnaround.com/software/jrebel/
http://www.playframework.org/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I used to think Java can be decompiled because it compiles into byte code and not object code. This is wrong because of the implicit assumption byte code is some how "more human readable" than object code. Why can programs written in Java be so easily decompiled and even have the same identifiers (variable names)? I heard in C/C++ it can only disassemble to assembly but no decompile to source code, why so?
Java compilers keeps most of the original information and does very little optimisation when producing the byte code. The compilers task is to validate the code so it can be dynamically optimised. Note: Excelisor compiles to native code and imagine would be difficult to decompile (at least that what their marketing says ;)
C/C++ is compiled and optimised as much as possible, discarding a lot of the original information. (With the exception for debug information) This makes it much more difficult to untangle into sensible C or C++.
Note: these are features of the compilers common used for those languages. Not features of the languages themselves.
In terms of the difference in languages, all you can say is that Java is relatively feature poor compared with C++. Less features makes less compiled patterns to understand and reverse engineer.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
If you need to choose the language to write your integration tests, what language would you pick? (from the above, or maybe another language).
The requirements that I think the language should meet are at least the following: fast, reasonable IDE, easy to learn.
Thanks!
I'd say Groovy is probably the best choice.
It offers significant advantages over Java (closures, list/map literals, very compact implementation of mocks)
It's very easy to learn incrementally for anyone familiar with Java (Scala is much more different, and many also consider the language inherently more difficult)
Groovy is pretty well supported by IDE plugins by now
The speed of the language is almost certainly not going to matter for integration tests, as the system being tested will probably contain much larger overheads (especially if a database is involved)
However, if you're already using Scala elsewhere (especially in the system under test) and can assume youre developers to be familiar with it, Scala may be a better choice.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Yesterday I saw the announcement from the Ceylon team that the first milestone release had been made publicly available. And from what I can see, it looks intersting.
From looking at the information on Ceylon, its purpose seems largely in line with the purpose of Scala...
Ceylon is deeply influenced by Java. You see, we're fans of Java, but
we know its limitations inside out. Ceylon keeps the best bits of Java
but improves things that in our experience are annoying, tedious,
frustrating, difficult to understand, or bugprone.
So, in a nutsheel, Ceylon and Scala seem to be saying (in my interpretation) We Like Java, but there are annoyances, so we want to build on top of Java to make life better.
But want I want to know is, why create Yet-Another-Java-Killer, as some have billed Ceylon, when Scala already exists? What sets Ceylon apart, or above Scala?
Note: Please no "I like X over Y", I am looking for an objective view of what Ceylon offers the development community.
The team behind Ceylon claims Scala is to difficult/complex/complicated and tried to create something that is simpler.
The echo that comes back from the Scala community is that Scala isn't difficult, and that Ceylon misses a lot of the important power of Scala.
It's hard to even think about this without getting into a flame war.
The M1 release misses important features, as listed in your link. As long as these are not delivered, Ceylon is basically just a Java with a nicer syntax. Once these features are available, there would be certainly a considerable advantage over Java, but not over Scala, which already has these features right now and more (most notably higher kinded types). Of course still syntax plays an important role, but that's mostly a matter of taste and excellent fuel for flame wars.