

Ask HN: What is the most enjoyable language to code in? - rtrocc

I'm a self taught web developer working primarily with advanced PHP and wanted to get an idea of what you guys think is the most enjoyable language to create something with? I tend to feel "comfortable" coding things with PHP but hate the fact it's one of the poorest languages to have in the toolkit. Looking for prospects...
======
MaysonL
I'm pretty much a self-taught programmer in my 50th year of programming, and
the languages I've enjoyed most aren't so much languages as environments. They
all provide one thing: quick feedback: not necessarily a REPL, but very close.

They've included: assembly language on III Comp-80/FR-80, Basic and Modula-2
on DEC Vaxen, Oberon-F/Black Box on 68K Macs, and Octave, Racket, and Scala(in
Eclipse) on current Macs. My favorite is still the Black Box environment, and
I mourn the fact thet Oberon Microsystems hasn't seen fit to port it to Intel
Macs.

------
ankurdhama
Clojure (or any Lisp dialect). Because there are few simple powerful
abstractions (so it puts less cognitive load in terms of language so you focus
on problem) and of course you can change the language to suit your problem
(whereas with other language you have to change your problem to suit the
language)

~~~
codewright
Gonna second the Clojure. Made a thread-safe concurrent "RequestContext"
mechanism for Ring apps in like 15-30 minutes of putzing around. No surprises.
Very enjoyable.

Not the most remarkable Clojure story I have, just the most recent one.

I use Python in my day job, but Clojure is the only time I really feel like
I'm enjoying myself or that my time is being spent well. Or that I'm not
profoundly limited.

------
speg
Like you, I was a self taught developer working on PHP. I switched jobs to a
Python shop and love it. It is so clean and nice to write.

That said, I think I like JavaScript the most. Simply because I know it the
best, it's simple, and flexible.

I picked up Objective-C last year and really liked it too.

All that to say, there's a lot more out there and I think you should
definitely explore outside of PHP. Once you get comfortable with a couple the
rest come much easier and it doesn't really matter anymore.

------
douglesband
I'd suggest looking at Perl with Mojolicious for web apps - great fun.

Just stay away from dated Perl tutorials - Perl development has evolved a lot
over the years. (perlbrew also recommended)

------
gregjor
For me it's always been the language that gets the job done. If you are a
hobbyist programmer you can pick whatever feels fun or interesting, but if
someone is paying you to code they usually don't care about programming
languages. In most real work you won't get to choose the language anyway,
because the decision has been made already or you are working with a big base
of production code.

I enjoy getting things to work and making clients happy. The programming
language doesn't really enter into it, though some tool sets can be more
frustrating than others. I charge more if I have to work with something I know
in advance will be tedious or painful.

As for saying PHP is "one of the poorest languages to have in the toolkit,"
that's only true for bragging to other programmers. PHP is what the majority
of web sites are written with. If you want to make money programming you'll
find that the uncool languages and tools such as PHP and MySQL (like Visual
Basic and Access before them) are the richest vein of paying work.

Keep your eye on new things but don't forget that professional programmers --
those who get paid for programming -- shouldn't hobble themselves by insisting
on only using their favorite language or tools.

~~~
gregjor
And then to answer your actual question: for me C has been the most enjoyable,
but that is largely a function of my age and career experience. One of the
most fun applications I've written in my 30+ years was in Fortran IV.

------
rtrocc
I agree with a lot of you about PHP being quite great for the applicable job.
I just tend to feel the hn community can be pretty biased at times. Either
way, I appreciate the input. Lots of great points made, particularly:

"You can make a masterpiece in any programming language."

and

"Keep your eye on new things but don't forget that professional programmers --
those who get paid for programming -- shouldn't hobble themselves by insisting
on only using their favorite language or tools."

I actually enjoy javascript better than PHP even though it tends to be more
tedious.

------
Lionga
C# for backend stuff (servers, DB access, business logic). LINQ, Lambdas,
await and all the other syntatic sugar is unmatched.

MXML + AS3 for frontend stuff. MXML with the easy (two way) databinding, event
system combined with a strictly typed language like AS3 are so fast to get
things done and maintainable. (For the notes: I am not using FLEX witch is
kind of bloated, just MXML)

------
geoffw8
Self-taught like you and by no means a coding genius (I can only really code
Ruby/JS) - but I really enjoy Ruby's syntax, its super clean and simple. I
think Python has a similar approach.

Well written Ruby just reads like plan 'ol English.

------
exelib
I like Python and JavaScript. But I code in Java because of robustness, speed
(runtime and ... development speed, yes!) and because here (in Germany) Java
is first choice language and because of good salaries.

------
rex_gsd
A poor coder blames his tools (or language). You can make a masterpiece in any
programming language. For that matter though I love PHP, been using it for
over 10 years. I've used other languages extensively too but for my own
projects it usually falls back to good old PHP.

I definitely wouldn't say it's one of the poorest languages to have in the
toolkit though; [http://news.netcraft.com/archives/2013/01/31/php-just-
grows-...](http://news.netcraft.com/archives/2013/01/31/php-just-grows-
grows.html)

Most enjoyable for web : php,

Most enjoyable for apps : c

~~~
ankurdhama
Language are not just tools. A tool has a specific purpose like Excel is a
tool, hammer is a tool. Do you create only "Text editor" using programming
language OR only "Database systems"? No, you create various kind of other
tools using programming language and hence it is a kind of meta tool and thats
why it matters a lot. A language is a kind of cognitive model for you to think
about and build other tools. "You can make a masterpiece in any programming
language" : Sure you can (make be you will take year's in the effort), but you
need to consider the cognitive load it will have.

------
damian2000
For me its C# - but maybe because I've become 'fluent' in it, so I now find it
easy to churn out decent code. Also I find the Visual Studio IDE a great help.

~~~
anonymouse123
I have to agree. Visual Studio + Reshaper makes coding an absolute pleasure.
The best investment I made was actually getting a book and really learning how
to use the VS IDE - time well spent.

------
damaru
I am not a great programmer but when I tried Lua I was actually having fun
coding and it was working really easily!

------
rtdp
I will vote for ruby.. Few reasons collection here -
HTTP://myloveruby.herokuapp.com

------
maxharris
Haskell.

------
jvenable
Python by far...

------
msoad
JavaScript

------
JohnHaugeland
> I tend to feel "comfortable" coding things with PHP but hate the fact it's
> one of the poorest languages to have in the toolkit.

Well, then you've already lost, because you're accepting what the herd is
telling you without any form of critical insight.

Enjoy wasting the next five years chasing fads.

~~~
codewright
Quoting "Beating the Averages" written by the creator of the community you're
ostensibly participating in, emphasis mine because I know reading is hard:

Blub programmer wouldn't use either of them. Of course he wouldn't program in
machine language. That's what compilers are for...

As long as our hypothetical Blub programmer is looking down the power
continuum, he knows he's looking down.

Languages less powerful than Blub are obviously less powerful, because they're
missing some feature he's used to. But _when our hypothetical Blub programmer
looks in the other direction, up the power continuum, he doesn't realize he's
looking up._

What _he sees are merely weird languages_. He probably considers them about
equivalent in power to Blub, but with all this other hairy stuff thrown in as
well. _Blub is good enough for him, because he thinks in Blub._

When we switch to the point of view of a programmer using any of the languages
higher up the power continuum, however, we find that he in turn looks down
upon Blub. How can you get anything done in Blub? It doesn't even have y.

 _By induction, the only programmers in a position to see all the differences
in power between the various languages are those who understand the most
powerful one._ (This is probably what Eric Raymond meant about Lisp making you
a better programmer.) _You can't trust the opinions of the others, because of
the Blub paradox: they're satisfied with whatever language they happen to use_
, because it dictates the way they think about programs.

Edit:

Your crab-in-a-bucket mentality will not be welcomed warmly here. You might
consider encouraging other people to learn new things instead of being a sour
asshole to somebody asking the community for advice.

Please go back to lurking.

~~~
JohnHaugeland
> Your crab-in-a-bucket mentality will not be welcomed warmly here.

Excuse me?

All I said was "you shouldn't be taking for granted that PHP is terrible, when
you don't know other languages, just because a bunch of people have told you
so."

I have actually been here quite a bit longer than you have; years before I
created my account. I've also been a professional developer for more than 20
years.

Just because you disagree with my position doesn't mean you get to insult me
and announce that a community which has received me better than it has
received you (take a look at our score averages, please) is not going to like
me.

.

> You might consider encouraging other people to learn new things

Maybe you should calm down and re-read what you're arguing with. That's
exactly what I did.

.

> instead of being a sour asshole to somebody asking the community for advice.

I think maybe you should also consider whether you're speaking to yourself by
accident. I didn't curse, or make any personal attacks.

What I did was say "if you make this assumption, and choose not to learn
directly, it will cost you."

.

> Please go back to lurking.

I would appreciate it if you don't speak to anyone in this fashion anymore.
Your tone is far beyond appropriate, you don't appear to have taken the time
to figure out what I was actually saying, and you have been really quite
unacceptably aggressive.

If anything, your tone encourages me to speak out more often, because I find
this sort of lynchpin "anyone who disagrees with the herd is just being a
crabby asshole" nonsense to be one of the most direct ways to challenge
people's intent to grow.

I mean, yes, you've managed to quote a blub article. Very nice.

But I don't think you've received the impact you were going for. I was _not_
an asshole by saying "don't take for granted what the crowd tells you; learn
for yourself." And I don't need to be told, in response, that I should be
encouraging learning.

The next time you feel like being this severely critical in public, it may
help for you to take a few hour breather, and then come back and make sure the
person really actually did say the thing you thought, and that your tone in
response is at least somewhat appropriate.

I hope you will consider the possibility that you're just yelling at your own
imagination. I'm kind of mortified by what just happened here.

I don't know how to walk away from this supportively. I realize you're trying
to defend someone, but it's from an attack that didn't exist, and in response,
you've gotten just astoundingly vulgar.

------
phaedrus
Ruby

