You are not logged in.
I'm currently gathering ideas for a honors thesis where I build a programming language over the course of a year. I'm currently what problem domains such a language should target. I'm wondering if there is a language that is higher-level and easier to program in than C++, but faster to start than Java? In many ways I'm looking for a language that's suitable for writing desktop programs in without having to muck about in manual memory management. The first thing that comes to my mind is C#/Mono but I've never used and I have know idea how it performs. Any recommendations?
The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github
Offline
Look at Python or Ruby. (I prefer Python)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Look at Python or Ruby. (I prefer Python)
Both are nice dynamic languages, much higher level than C++, but they're not faster than Java.
I don't know if it is true but I've heard and read that the latest incarnations of the JVM on major platforms are very well optimized and get you C-like performance from your code. No idea if it's true, tho.
Anyway - high level languages that are compiled, off the top of my head - D (own compiler), Vala, Nimrod (both 'compile' to C code).
I would say Haskell, as it is compiled but I gather it's not as much 'high-level', and more like 'whole-other-out-of-this-world-batshit-insane-level'.
Offline
Look at Python or Ruby. (I prefer Python)
... as you reply to somebody with a Python logo in his avatar
To the OP: maybe Haskell? It's quite different, but is both high-level and, as it's compiled, has good performance.
Offline
"faster" is relative. Not sure what you mean by "faster to start"; assume you mean the time it takes to load the JVM and whatever libraries are needed, so you're looking for a language with low overhead.
In any case, yes, Python is probably a good place to start. If that's too slow, my next thought would be Perl, but I am well aware that many people would disagree with me.
Offline
this thread may help you.
Offline
C# is shit, but that's my personal opinion (and yes, i can actually get some facts for that)
Java is fast, I wouldn't be surprised that on some rare occasions it can be made faster than C++03 since in most cases, you return things by value in C++, while in java reference is fine (though java and C# have no notion of const correctness, not exactly sure for C#, but i think I'm right)
and if you absolutely don't want to do any of the memory management in C++, just use a smart pointer - sometimes you'll end up needing to use them anyhow; only shame about C++'s current standard is that it has only one (hmm?) smart pointer, called auto_ptr which isn't very useful, and iterating through STL's containers requires a lot of code, much more than in other OO languages. (C++0x fixes both of these issues, along with rvalue references - which improve speed while allowing const correct code - you can find most of the new stuff in gcc 4.4 and higher, just compile with -std=c++0x)
some people mentioned functional languages, don't go there if you don't have the time unless you know some already, the syntax, way of thinking, it's quite different, you can't just look at the code and figure out what it's doing, it's no python
Offline
I also think Haskell fills these requirements nicely. As for seeing how a language performs, the Language Shootout is rather interesting.
Offline
... snip ...
I would say Haskell, as it is compiled but I gather it's not as much 'high-level', and more like 'whole-other-out-of-this-world-batshit-insane-level'.
This is priceless.
Offline
I know it's C++, but honestly I think something like QT nearly fits in to the topic of this discussion. It adds enough pre-processing to C++ that it is in some ways like using a different language, and it is sufficiently high level while feeling pretty fast.
Offline
I know that Python starts up early, but I know that it's slower than Java for anything that's longer running or algorithmically intensive. The Java JIT technology is some of the most advanced on the planet. It seems to me that either Haskell or one of the compile-to-C languages are the best shot.
I've heard of Vala, but Nimrod seems very interesting too, especially since it has good bindings. I also like how the compiler for it is well-documented, which is cool since I'm planning on implementing a language soon myself.
Last edited by Basu (2009-12-09 01:42:20)
The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github
Offline
When I hear "high-level" I think Ada...
Offline
You should check out lolcode
Offline
ataraxia,
I confess, I never even look at the avatars -- but it is funny.
Basu, et al.,
I actually took your question to mean in which language would it be possible to create useful programs rapidly. As such, I stand by Python. I often use things such as PyQt to prototype C++ Qt projects.
Taken the other way, I agree that if quickly means the time to invoke an instance of a program Python might not be the ideal.
Stated without proof, my gut feeling is that a compiled language with static links to any libraries is going to be the fastest out of the blocks.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
C# which is endorsed by ECMA a lot. Is one such language which is dominating the market right now.
Offline
Common Lisp is exactly what you've asked for. If you're actually planning on doing a project, I'll give you the hint that ECL is an implementation to watch if you need to create little binaries. SBCL is a good old standby, and probably the fastest free Lisp for most uses.
You're just looking for inspiration though, right?
Last edited by pauldonnelly (2009-12-09 07:42:51)
Offline
What about Lua? It compiles, but I am ensure to its speed in relation to C++ and Java.
There is a difference between bleeding [edge] and haemorrhaging. - Allan
Offline
Offline
One more for Haskell, this time with a link to Hackage http://hackage.haskell.org/packages/arc … -list.html
Oh, and writing Compilers is a really strong point of Haskell! Or embedding a Domain-specific language.
Offline
I've actually been thinking more about the language that I'm going to develop for my thesis and I'm pretty certain that I'll write the compiler for it in Haskell (if I learn enough of it in one summer). I'm certainly going to look into writing more run-of-the-mill programs and exploring it in general. I'd love to look around the other languages and I will if I can get time. Guess I'll be learning Haskell and Scala together next year.
The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github
Offline
You might appreciate Write yourself a scheme in 48 hours, it should give you a quick start on implementing a language on top of Haskell while introducing you to Haskell. (Note: I haven't followed the tutorial yet.)
I found The 90 Minute Scheme to C compiler (the explanation is done in a 90 minutes presentation, writing the compiler takes a bit longer) to be a good overview about source transformations. While I can't apply most of the techniques yet, I finally have an understanding on how such a transformation is done.
Edit: Removed ambiguity.
Last edited by wuischke (2009-12-10 00:04:58)
Offline
^ Looks very cool. Thanks.
Offline
a language that is higher-level and easier to program in than C++, but faster to start than Java?
Isn't this the purpose of Go ?
Offline
D or Haskell, yeah.
Python, maybe, with Unladen Swallow.
Offline
ocaml?
Offline