Page 1 of 1
Best compiled language?
Posted: 2010.07.19 (04:01)
by 乳头的早餐谷物
I am seeking recommendations for compiled languages (that aren't C/C++) which feature the sort of benefits (e.g. speed) commonly associated with such languages.
Re: Best compiled language?
Posted: 2010.07.19 (06:50)
by scythe
Well, the simple answer is that it really isn't that simple. On a basic level, the languages which offer the most flexibility and speed are OCaml and Haskell, no contest. However, Haskell is very difficult to learn, OCaml is only a little easier, and both languages have terrible library support, and it's my recollection that binding them to C is a giant pain in the ass.
As for easy languages, D is a lot easier, but it's a huge mess with more features than documentation and basically no compiler support, plus it's not as fast. Common Lisp, in the form of SBCL or some other CMUCL derivative, is compiled but slightly slower though a lot more flexible than D and simpler than Haskell or OCaml. Ada, the infamous military language, is faster than all the other options and very simple, but incredibly verbose. It might actually be your best choice here but I have no experience and I've never met anyone who uses it very often. Go, Google's language, is compiled and may well fit your requirements, but it's a good deal slower and is beaten by the faster VM languages (Java, Scala, Lua, and C#); it's also new and I don't know what library support looks like, especially on Windows (I don't even know if you can write Windows GUIs with it yet).
I'd say either Haskell or Ada, depending on how you feel about functional shit. For what it's worth, Suki hated Haskell.
Oh, and J is compiled.
Re: Best compiled language?
Posted: 2010.07.19 (08:56)
by Geti
lol I'd say actionscript but it would be a massive joke. It is compiled though. You could go for BASIC actually, it's not quite the scumbucket everyone who codes in C like a machine makes it out to be.
Why do you want to stay away from C/++?
Re: Best compiled language?
Posted: 2010.07.19 (09:04)
by 乳头的早餐谷物
Geti wrote:lol I'd say actionscript but it would be a massive joke. It is compiled though. You could go for BASIC actually, it's not quite the scumbucket everyone who codes in C like a machine makes it out to be.
Why do you want to stay away from C/++?
Curiosity, basically, since I already know C /C++ (and BASIC for that matter).
I've never touched a functional language before, so I'll have a look at some of those. Haskell looks an interesting challenge.
Re: Best compiled language?
Posted: 2010.07.19 (10:46)
by Geti
triplesec wrote:Curiosity, basically, since I already know C /C++ (and BASIC for that matter).
Oh, well, that changes the context a fair bit. Be sure to give us a look at the results then :)
Re: Best compiled language?
Posted: 2010.07.19 (20:55)
by t̷s͢uk̕a͡t͜ư
In my efforts at broadening my horizons, I've actually learned time and again that I'm much better served by using the energy and enthusiasm I have for learning a new language to instead learn more about C, such as GLib or reading through the glibc documentation. In particular, learning about systems programming can set you up for the uplifting feeling you get when you start looking through Linux source code and realize it's Not Magic.
For a number of
Project Euler problems, once I found the solution, I rewrote the code I used to find the solution in Ruby and compiled Common Lisp for comparison. C almost always blows everything else out of the water.
But seriously, if you're not familiar with GLib for C, you're really not doing yourself many favors. GLib has tried-and-true implementations for hash tables, sets, array variants, regular expressions, etc., etc. It's all the stuff you wish you'd saved from your Data Structures classes, except written and tested to death by professional C ninjas. It's like Boost for C++, except that C isn't a bloated, schizophrenic trannie.
Although the shell was surprisingly fast at finding a shit-ton of primes. I guess it might have something to do with the efficiency of pipes, so that the whole process is as parallelized as possible.
Here, for example, is GNU coreutils used to generate all primes (except 2) less than 10 million:
Re: Best compiled language?
Posted: 2010.07.20 (13:16)
by Tanner
I think you need a girlfriend but can't decide if maybe you deserve ten of them for that post.
Re: Best compiled language?
Posted: 2010.07.20 (18:32)
by t̷s͢uk̕a͡t͜ư
hairscapades wrote:I think you need a girlfriend but can't decide if maybe you deserve ten of them for that post.
Improving your UNIX skills and having a love life have really proven to be mutually exclusive. After attempting in vain to juggle them for a bit, I decided on a full sprint into the former, with a glimmer of hope in the distance that I'd end up writing an AI sophisticated enough that I could confuse it for a friend. ;_;
Re: Best compiled language?
Posted: 2010.07.20 (19:43)
by smartalco
Tsukatu wrote: with a glimmer of hope in the distance that I'd end up writing an AI sophisticated enough that I could confuse it for a friend. ;_;
Don't ask me how but I read that as 'an AI sociopathic enough', and still thought it fit for you.
Re: Best compiled language?
Posted: 2010.07.21 (02:54)
by taaveti
smartalco wrote:Tsukatu wrote: with a glimmer of hope in the distance that I'd end up writing an AI sophisticated enough that I could confuse it for a friend. ;_;
Don't ask me how but I read that as 'an AI sociopathic enough', and still thought it fit for you.
Well hello there, GLaDOS. You're looking mighty modular today...