Hacker Newsnew | comments | leaders | jobs | submitlogin
One (programming) language for the rest of your life. Which one?
19 points by watmough 761 days ago | 82 comments
If you had to pick one single computer language to use from now until the end of time, which one would you pick? What qualities are you looking for? What are your programming goals?

If you like, you can specify a platform or libraries if they colored your choice of language.



32 points by __ 761 days ago | link

C++. That way, I'll look forward to my death.

-----

3 points by innernode 761 days ago | link

hahahahahaha :D made my night! thanks!

-----

15 points by dag 761 days ago | link

Lisp, because it can consume any other language's functionality, which means that I don't have to choose.

-----

6 points by coffeeaddicted 761 days ago | link

Yeah, but if you use c or c++ you can implement a Lispinterpreter over the weekend, so you'd have both. The other way round it's rather hard.

-----

4 points by euccastro 760 days ago | link

The other way round it's rather hard.

The hardest part would be finding a reason to do that.

-----

3 points by mojuba 760 days ago | link

The reason would be to write a Lisp interpreter.

-----

2 points by dreish 760 days ago | link

You missed the "other way round" part.

-----

2 points by eru 759 days ago | link

No, he did not. The reason to write a C compiler / interpreter in Lisp is that so you can then write an Lisp system on top of C and show off your 'uber-haxor skillz'.

-----

1 point by brent 761 days ago | link

The question isn't what compiler you would want to start off with. Its what programming language (one SINGLE programming language) would you want to use if restricted to use only it.

-----

3 points by coffeeaddicted 761 days ago | link

Not so easy as the distinction between programming language and ways to interpret data is often rather soft. Would xml already count as programming language? If not, how about using Lisp only to load configuration data and maybe to exchange data between running applications? An advanced data format is not really different anymore from a programming language. Or should I no longer use s-expressions if I chose something else than lisp? What about makefiles or bash-scripts? Am I no longer allowed to use my editor if it's not programmable in my favorite language?

It's just a hypothetical question, so there's some room for interpretation :-) So I really thought more of it as "with which language would I start out".

In my case C++ would have a good chance for that (maybe I better change my nickname on ycombinator after getting out with this...). It's one of the few languages which does not confront me with any barriers between me and the system and I like that. I might take longer than with other languages for a lot of tasks, but I know that if something can be done with the computer then I can do it with C++. Also I have lot of experience with it (for example in implementing small parsers) and experience is certainly always an important factor.

But the most important factor would be the tasks I would expect to face from now on. Lets say I expect to work on some more games or similar virtual worlds. I already know c++ works for that (for me) so I would chose it. If I would expect to do server-side programming then it would be another language.

-----

3 points by tlrobinson 761 days ago | link

Turing completeness is a pretty good indicator. According to that, XML is not a programming language.

And since both C++ and Lisp are Turing equivalent you can implement each using the other.

Given that, if we're allowed to build other languages on top of our chosen language, then I too would choose a low level language like C or C++ (at this point I think assembly is too low level for most things)

-----

14 points by entelarust 761 days ago | link

python

-----

1 point by sriram_sun 761 days ago | link

cpython, jython, IronPython, pypy or stackless? :)

-----

4 points by marcus 761 days ago | link

Those are implementations not languages, the language is the same language.

And when people don't mention a specific implementation they usually mean CPython.

-----

2 points by eru 759 days ago | link

You are right. Partially. As far as I know Stackless introduces some new concepts.

-----

10 points by mechanical_fish 761 days ago | link

What an inane question. That's like asking Thomas Edison which brand of telegraph key he'd like to use for the rest of his life.

-----

11 points by pg 761 days ago | link

Bad example. People who send morse code (there are still a few) seem to care a lot about which they use. And since Edison was famous as an an extremely fast telegrapher, he'd probably be especially picky.

-----

9 points by mechanical_fish 761 days ago | link

Oops, you've misunderstood me -- my telegraph post was, dare I say it, too telegraphic.

Yes, Edison (like all other telegraphers) must have cared a lot about telegraph key design, just as great hackers care about language design. I did not mean to imply otherwise.

What I was trying to say is that it's inconceivable that a hacker of Edison's caliber would use a single technology for his entire life, even in the (already extremely hypothetical) absence of external factors. That's because, within a handful of years, the hacker changes the tech to the point that it's no longer the same thing.

I would suggest that Edison not only cared a lot about telegraph design -- he cared so much that he took every aspect of the telegraph apart to see how it could be improved, and eventually developed the Edison telephone (http://encarta.msn.com/media_461551270_761563582_-1_1/Thomas...) along with a vast raft of other tech that was unknown in his youth.

What makes the question inane is that it assumes that "now until the end of time" is equal to or less than the lifetime of a computer language. It's not. Computer languages evolve so fast that nobody has ever stuck with one language throughout their lives. If external forces don't rewrite your language, you eventually rewrite it yourself -- you develop a bunch of libraries and restate problems in terms of them. And by "eventually" I mean "in weeks, rather than months or years" -- Steve Yegge rebuilt Rails in Javascript in less time than it took me to write this stupid post.

I suppose I could try to claim that I would be happy to be a Lisp programmer until the end of time. When someone accuses me of cheating by using Arc (which I hope to do, someday), I'll just claim that it's really Lisp. When someone needs a device driver written, I'll just claim that x86 assembly is really Lisp -- all I need to do is write the assembler in Lisp, yes? Or should I go for broke and claim that my "eternal language" is the native language of a Turing machine? It'll take me a long time to get back up to, say, Rails, but I've apparently been sentenced to spend the rest of my life at it, so why not bite off something challenging?

-----

1 point by eusman 761 days ago | link

computer languages evolve so fast? all languages used today are at least 10 years old

-----

3 points by mechanical_fish 760 days ago | link

I wrote some Java code back in 2000, but then I stopped using the language. I picked it up again in 2003 or so, and found that it had changed.

Today, Java has generics, which I haven't studied and therefore don't understand. I believe the consensus is that you can't really be a Java programmer without understanding generics, so -- oops! -- I'm not a Java programmer anymore. My knowledge is oh-so-2003.

Tomorrow Java may get closures -- the debate rages. If it does get closures, all the Java programmers will have to update their skills or fall off the wagon.

The other day I heard a guy on a podcast talk about his disastrous attempt to test-run Drupal 3.0 (god knows why). That software is about three or four years old. Apparently it doesn't work anymore. PHP and/or MySQL and/or Apache have evolved right out from under it.

The names of all the programming languages used today are at least 10 years old. Just as the name of the English language dates back to Chaucer's time and before. Have you tried reading Chaucer?

-----

1 point by eusman 757 days ago | link

never crossed with any of his writtings

the thing is that innovations in languages don't happen tomorrow. Though when they do happen, an experienced progammer shouldn't have any difficulty in adapting in a new feature of a language that is added to supposly to add value.

Since you reffered to natural speaking languages its obvious that it seems natural, programming languages to take characteristics of other languages as it happens in real life that they take words from each other.

-----

5 points by jsmcgd 761 days ago | link

You say inane, others say hypothetical.

-----

1 point by mechanical_fish 761 days ago | link

Okay, maybe "inane" is too harsh. How about "ill-posed"?

-----

10 points by cperciva 761 days ago | link

C99. It can do everything I want, and while there are some tasks for which it's not the ideal language, I can write my own libraries to supplement the existing ones.

If I'm going to be stuck with only one language, I'd rather use a language where some things are harder than in other languages, rather than a language where other things are simply impossible.

-----

5 points by Todd 761 days ago | link

Agreed. Not to mention that you can just write your own flavor of any language you choose (most are already written in C). Plus, you've got til the end of time, so the fact that it'll take a few years to write the first one shouldn't be a problem.

-----

8 points by aaroniba 761 days ago | link

javascript: it's "like scheme with syntax", necessary anyway for cool web apps, expressive, has closures, lexical scoping, and with Rhino you can access any of the Java libraries (without writing Java code) and run it efficiently on any platform (for server-side or desktop apps). It's really the do-it-all language.

-----

1 point by michaelneale 761 days ago | link

I think (and hope) you are right. Its not to ugly either (I guess depending on how you "grew up"). Lisp for people who can't program without braces ;)

-----

2 points by watmough 761 days ago | link

Oliver Steele has written a great functional programming library that adds list comprehension and textural/literal lambdas to Javascript.

I keep meaning to play with that, but I always seem to have something else (like work) that I need to worry about.

Analogy alert: I kinda see functional programming as like giving up smoking. It may hurt a bit at first, but it's much better for you in the long run, providing you don't annoy everyone by continually letting them know...

-----

2 points by michaelneale 760 days ago | link

Man I wish I had a name like "Steele".

"Guy Steele" - now that is a name that demands greatness just by the force of the name.

-----

8 points by pg 760 days ago | link

Man I wish I had a name like "Steele".

So did a famous Soviet political leader.

-----

7 points by gibsonf1 761 days ago | link

Lisp - for the sheer power and enjoyment of using it

-----

9 points by ijoshua 761 days ago | link

If you give someone Fortran, he has Fortran. If you give someone Lisp, he has any language he pleases.

-----

2 points by tlrobinson 761 days ago | link

Extending that argument, if you give someone any Turing-complete language, he has any other Turing-complete language...

-----

2 points by parbo 761 days ago | link

But as coffeeaddicted said above: if you give someone C/C++, he can implement a lisp interpreter easily and then have any language he pleases..

-----

11 points by ijoshua 761 days ago | link

Given Lisp, I can implement a Lisp interpreter easily:

    (loop (print (eval (read)))

-----

3 points by parbo 761 days ago | link

Yes, but can you write a standards-compliant C++ compiler?

-----

14 points by davidw 761 days ago | link

Easily, because in bizarro-one-language universe, I also have an infinite supply of monkeys. Hah!

-----

1 point by euccastro 760 days ago | link

Put one monkey to work on C++ and assign the rest on Hamlet. Oh, and make the C++ one use a typewriter too.

-----

2 points by Nicolay77 761 days ago | link

I think that compilers should be specially easy to write in Lisp over any other language.

However in the time that most people were writing compilers no common or popular computer had enough memory to run Lisp reasonably. Even 8MB were a luxury.

Now we have 2GB of RAM as the norm.

-----

1 point by brent 761 days ago | link

As I replied to ca above, this would be breaking the single rule in question. You are limited to a single language, not a single compiler/interpreter to start with.

-----

7 points by ivankirigin 761 days ago | link

Blub. Why choose a lesser evil?

-----

1 point by ijoshua 761 days ago | link

Whatever language, I just hope it comes with decent documentation.

-----

7 points by ivankirigin 761 days ago | link

Blub's is the best, as far as I can tell.

-----

5 points by jimbokun 761 days ago | link

Lisp.

-----

4 points by michaelneale 761 days ago | link

Lisp - its not really a language to much as a meta tool to allow you to build DSLs to solve your problem.

-----

4 points by kirubakaran 761 days ago | link

If you had to pick one single tool to use from now until the end of time, which one would you pick?

Choices:

Hammer, Drill, Screw Driver, Saw.

-----

4 points by brent 761 days ago | link

Poor analogy. These are, for all intensive purposes, tools for mutually exclusive tasks. Programming languages are in general for the purpose of writing programs. While they may different slightly in capabilities they are for one purpose. A "better" (IMHO) analogy along those lines would being choosing a handsaw, bandsaw, circular saw, or kitchen knife.

-----

2 points by staunch 761 days ago | link

No insult intended: http://www.urbandictionary.com/define.php?term=For+all+inten...

-----

2 points by brent 761 days ago | link

:-O Yikes. How embarrassing. No insult taken. I have pointed this out in other's writing. Funny how easy it is to slip and type mistakes like this when you're rushing out comments. Good catch...

-----

1 point by icky 760 days ago | link

> for all intensive purposes,

Nitpick: "for all intents and purposes".

And, no, you don't get French benefits.

-----

1 point by kirubakaran 761 days ago | link

I agree.

Even if we commit for life to the best saw there is, we are excluding all future saw-innovations.

-----

1 point by bayareaguy 760 days ago | link

When C++ is your hammer, every problem looks like your thumb.

-----

3 points by Zuider 761 days ago | link

Haskell - If I was in some timeless eternity I wouldn't have to bother with monads. Otherwise if I get bored I might hack together a big bang with Lisp.

-----

3 points by jfoutz 761 days ago | link

As tempting as lisp is, I think i have to throw my hat in the Haskell ring.

Lisp lets me turn pure thought into code, as it turns out a good percentage of my thoughts are pretty crappy. Haskell fixes that.

-----

2 points by dima 761 days ago | link

Erlang.

-----

2 points by sriram_sun 761 days ago | link

Don't Care! I know I'm going to cheat! :)

-----

2 points by rmason 761 days ago | link

Coldfusion. Name another language supported by three commercial vendors plus a fourth open source version (smithproject.org)? My goal is simple - rapid application development.

-----

3 points by paulgb 761 days ago | link

"Name another language supported by three commercial vendors plus a fourth open source version."

I'm sure you could say the same about C++ and Java, and probably a bunch of other languages. But that doesn't really say much about the language itself, only who uses it.

-----

1 point by BrandonM 761 days ago | link

Not to mention Lisp, which has no fewer than 8 commercial and 10 open source implementations listed here:

http://wiki.alu.org/Implementation

But you are certainly right that the number of implementations is irrelevant, as long as there is either one good open source one or 2+ commercial ones.

-----

2 points by chaostheory 761 days ago | link

are you trying to start a religious flame war on yc news?

-----

2 points by watmough 761 days ago | link

I don't know about Flame War, but I think it's an interesting question.

Personally, if I had to choose one language right now, I'd probably choose Javascript, simply because the syntax is easy for a PASCAL/C/C++ user, and it still manages first-class functions, much like my first real (non-BASIC) language, which was PS-Algol (think Java reflection, first class functions, easy persistence, but in 1987, not 1997!)

Once Javascript gets a mainstream in-browser JIT, it may well become even more my language of choice than it is now.

Other than Javascript, Rich Hickey's Clojure, is a pretty good candidate. I love the syntax, and being able to work directly with the JVM libs.

-----

2 points by jdavid 761 days ago | link

C#

with C# compilers running on almost every platform. It can do old things like c & c++ can, and it has advanced string and memory management set up by default. c# has more control and ease of use than any other language i have played with.

If i need to consume a DLL i can do it through old ways like C methods, OLE, COM, or through new managed methods.

other languages are nice, but if i had to use just one from now and to forever, C# is the only language i see that has the ability to span the gap. Ruby, PHP, Perl, Lisp, erlang, Java, smalltalk, etc... do not seem as flexible across all of the needs to program both software and hardware.

C# can be used to program Dirext X, and OpenGL, it can be used to hack your GPU and to program your portable device. Mono runs on linux and so you can use C# in any embedded app.

-----

2 points by kirubakaran 761 days ago | link

What happens if I don't pick anything?

-----

6 points by eusman 761 days ago | link

you will live a better life!

-----

2 points by watmough 761 days ago | link

You will be forced to maintain poorly written C++ for the rest of your days.

Quote from some guy at Continental. "It wasn't a memory leak, it was a memory faucet!"

-----

1 point by emfle 760 days ago | link

The nice thing about C++ is that memory leaks are easy to fix. Valgrind is a pretty bad-ass tool.

In garbage collected languages leaks can be very hard to track down. And they do happen from time to time.

-----

2 points by fogus 761 days ago | link

I was half tempted to pick Python, but I suppose my true answer would be C.

-----

2 points by henning 761 days ago | link

Do you have to stick with a single implementation (once you choose MRI you couldn't switch to JRuby) or just the same language?

Probably Lisp or some other highly growable language.

-----

1 point by mynameishere 760 days ago | link

Java, because I don't have a trust fund.

-----

1 point by cheponis 760 days ago | link

Verilog. You software weenies don't seem to understand that your fluffly abstractions need to run on real h/w. So I'd rather have control at the lowest level.

-----

2 points by tuxiano 761 days ago | link

python in this world, lisp in paradise

-----

1 point by kashif 761 days ago | link

Python till I die baby!! And then some...

-----

1 point by Kaizyn 761 days ago | link

If I could only work with one language, then I'd have to say Forth. While I don't know this one nearly as well as any of the others, this one allows you to work at the assembly instruction level up through the level of abstraction of languages like Python/Javascript. Lisp on LispMachine hardware would offer you the same sort of advantages.

The C and D languages look like they might also be fairly good choices. Everything else doesn't seem to give you the flexibility to go down to the metal while also having the ability to move up to much higher levels of abstraction.

-----

2 points by ksamuel 761 days ago | link

Since the question specifically includes libraries, I would pick the language with the best selection of useful libraries, and the largest community of users actively creating new ones. For my money, that would be Java -- even with all eternity to write my own libraries, I'd prefer have the option of not doing so, so that I can focus my time on the areas where it is important to roll my own.

-----

1 point by nreece 761 days ago | link

C# (with MS .NET on Windows, ASP.NET on the web, and Mono on *nix)

-----

1 point by engtech 761 days ago | link

ASM

because if I don't have ASM, I'm not going to get much of anything else done.

-----

1 point by tarkin2 761 days ago | link

I was going to chose this as well because eventually I'll want to interact with new (and exciting) hardware. I think that's the overriding concern.

For instance, no matter how much I love PLT-Scheme, Haskell, etc if I chose one of them there'll come a time when I want to code on a new piece hardware and won't be able to because I cannot access the underlying memory registers.

But if you have to choose which hardware specific asm then that's even harder...

-----

1 point by anupamkapoor 761 days ago | link

MIPS

-----

1 point by boredguy8 761 days ago | link

That's easy: Motorola 68000

-----

0 points by rmason 761 days ago | link

@kajecounterhack

Maybe you should tell the four vendors that keep producing new versions that Coldfusion is dead.

As to other languages/frameworks - did I mention that it needs to scale as well?

-----

0 points by kajecounterhack 761 days ago | link

@rmason -- coldfusion?

its DEAD.

quick application development...hmm. Some other language + framework would be more like it.

I like C++ or lisp.

-----

1 point by himanshu 761 days ago | link

I am still learning many things about python but I think it would be the one language I would choose for the rest of my life.

-----




Lists | RSS | Bookmarklet | Guidelines | FAQ | News News | Feature Requests | Y Combinator | Apply | Library

Analytics by Mixpanel