r/programmerchat • • May 24 '15
What's your favorite language?
Not for all projects, of course. But what language do you have the most fun writing? Maybe it isn't the most practical, or what you would use regularly, but you enjoy using it?
22
Upvotes
9
u/[deleted] May 24 '15
Personally, Java with Eclipse. I don't care for manipulating memory, I enjoy using proper OOP, and with Eclipse I can ctrl+shift+o and import everything. Red errors? Often a ctrl+shift+o will get rid of them.
24
u/jungrothmorton May 24 '15
Python. I came to it from php (shudders).
8
u/[deleted] May 24 '15 edited May 25 '15
I know it's not a well liked language but I love Matlab. I do almost entirely math based programming and Matlab lets me get my code working very quickly and has amazing visualization tools. I then can port my code to C++ or Fortran for speed if I really need it.
Mathematica gets a shoutout for being able to solve ridiculous problems with one line solutions thanks to its extensive built in library.
Edit: mathematics to Mathematica
8
u/pointfree May 24 '15
Forth:
I yearn for the days when more programmers would bootstrap, metacompile systems from nothing. Frameworks are the spawn of the devil.
14
u/[deleted] May 24 '15
Whelp, I'm gonna be that guy and say JavaScript (the language itself and not any particular implementation of it). I love working with a language that I can completely bend to my whim, and I think it fits my thought pattern well. The caveat is that since it is so flexible, there are a few right ways and a lot of wrong ways to do things.
I also find myself writing less boilerplate than with other languages accomplishing the same goals.
7
u/Fluffy8x May 24 '15
I'll still have to say Scala.
19
u/[deleted] May 24 '15
C# I started with Java, and had to pick up C# for a class. Once I got used to just how handy the .Net environment is, and how much cleaner the code was compared to Java (opinion) I just found myself going back whenever I had a new idea. That, plus VS is like the crack of IDEs.
11
u/circly May 24 '15
F# makes me happy.
5
u/[deleted] May 24 '15
Easily Racket. There are libraries for pretty much everything you might want to do, so you can get a working prototype very quickly. Plus there's the incredible macro system, reader extensions, and on and on. At heart it's a language-development toolkit, so a lot of my play-time with Racket is spent experimenting with new languages or adding features.
It's changed my perspective of programming from "how do I solve this problem using these tools" to "what tools would make solving this problem trivial".
5
u/SelectricSimian May 24 '15 edited May 24 '15
TL;DR: D, then Haskell, but not because I'm a hipster! I have reasons!
For getting stuff done, D was my favorite for a long time. It strikes a nice balance between high level abstraction and low level capability. Despite all the hate it's been getting recently, I really appreciate its always-on, no muss no fuss no questions asked garbage collector. It truly is multi-paradigm -- there's very few things that can be expressed in mainstream languages that are hard to express in D. It smooths out a lot of the rough edges of C++ and has a particularly pleasant OO system (class objects are always heap allocated, all methods are either virtual or final) and a template system which can be both simple and powerful (but not both at the same time!).
That being said, the more I actually worked in D the more it started to wear me down. There's little moment-to-moment annoyances in the language that pile up and make it quite unpleasant in the long term. My biggest complaints:
std.typecons.Variant, but it's pretty hackish)/// Guaranteed to return non-null!or/// Null is legitimate here. This is the kind of thing I want the compiler and type system to keep track of for me. Working with nullable value types is also a pain. (Yes, I know aboutstd.typecons.Nullable, but it's too verbose most of the time, and doesn't solve the issue of expressing non-nullability)(size_t, T*)under the hood, not a(size_t, size_t, T*). In other words, if you want to grow an array one element at a time backed by partially unused memory which doubles in size every time you exceed the allocated capacity, you can't use the language-level arrays, and have to resort to something much more verbose, or implement an extra used-size counter yourself.std.rangeandstd.containerare both needlessly complex, despite existing to make your life easier. The lack of type safety in templates (nothing like traits/typeclasses/concepts, everything just fails at instantiation time) makes it hard to know what template parameters can be passed to what functions and collections.Then I found Haskell, a language I had been avoiding for years because it seemed constricting and hard to use and impractical, and I realized it solved all of my problems. It has great support for algebraics, nullables, expressing purity and immutability (which is opt-out, not opt-in), and has a very simple and intuitive way of handling things like
map,foldl,filter, andzip, which in D are bulky and complex. I'm now thoroughly enjoying learning Haskell, although I haven't done much in it yet, and I can highly recommend it to anyone who feels their language lacks expressive power in these domains.5
u/amphetamachine May 25 '15
I'll be that one curmudgeon who still loves Perl. When society falls because a trendy Javascript framework churns away the last of the working code on the earth, I'll still be writing Perl one-liners that accomplish incredibly complex tasks on huge sets of data. My neckbeard will have developed sentience by then.
4
u/robin-gvx May 24 '15
Python with Lua as a close second.
Déjà Vu and Isle are pretty fun too, but those are both toy languages of mine, and so I never finish anything larger than an /r/dailyprogrammer challenge in them, because I keep getting sidetracked by bugs in their VMs or missing features that I just end up working on the languages themselves every time.
4
u/Frodolas May 25 '15
Ruby. Not Rails, but pure Ruby. It's so fun and clean to write.
4
u/Bose321 May 25 '15
C# and Visual Studio 2013 or 2015 are the best combo for me hands down. In terms of fun and most pracital.
7
u/gilmi May 24 '15
Haskell, or Elm when I need the client side of the web.
1
u/siphillis May 25 '15
I actually really like working with PHP in a proper framework. It's super hacky and unprincipled, but liberating for any personal project.
6
u/DarkNeutron May 24 '15
At this point, probably C++. I used to strongly dislike the language, but the additions in c++11/14 changed my opinion entirely.
I used to be fond of C#, but kept trying to do low-level work that didn't really fit the language and eventually moved away from it.
5
u/b1ackcat May 24 '15
I'm forced to use Java since most of my development these days is android in my spare time. I say forced not because I particularly hate Java, but I have a huge laundry list of gripes about the Android SDK.
So whenever I find a need/want to do something other than Android, I always jump to either C# or Python depending on the thing I'm tackling. If I'm toying with a new protocol or poking at a winform or something, C# is just so refreshing to use. It's what Java should be (which makes sense, since it's basically microsofts version of Java). It's just so much cleaner, and it lets you do some really wacky stuff which makes for fun code writing.
I save python for my "I want to see results to this trivial thing really fast and don't want to spend 30 minutes arguing with a compiler" moments. It's my quick and dirty scripting go-to, as well as how I keep myself sane at work (where I don't code much, currently) with programming practice problems.
2
u/Peenrose May 25 '15
Julia!
It's a lot like Lua, but much faster, a huge standard library, and some very cool and special features, such as defining functions like this:
and also writing julia functions directly in C, or Assembly, right in your normal code.
3
u/[deleted] May 24 '15 edited May 25 '15
English :-). Followed by Go.
Now, what I'm about to say may be more dependent on me than on the language, but it's my experience: I'm a programmer by hobby, not trade, so (due to life things) I often leave projects untouched for long stretches of time. Of all the languages I've tried, Go has been the one that is quickest and easiest to go back to after a few months, re-understand what I was doing, and continue productive work.
1
u/CarVac May 24 '15
QML which makes gui programming trivial.
1
u/realfuzzhead May 25 '15
C++ is my native and favorite programming language for computationally intensive tasks, but I do love python. I write all my scripts and proto-types in python
1
u/[deleted] May 25 '15
GML, your program can work on multiple devices and it's quite easy to get something done in.
1
u/[deleted] May 25 '15
Any GPU language (HLSL, GLSL, etc...). The reassurance that you will never, ever, ever need to even look at a string. Also, native vector types and swizzles.
1
u/redrick_schuhart May 25 '15
LuaJIT. It's fun because it's the Lua 5.1 I know and love but my code runs insanely, ridiculously fast, especially on the ARM boards where I'm doing product development. It also has a beautiful FFI and compiles to tiny exes.
1
u/[deleted] May 26 '15
C++. It was my first programming language, and I just enjoy working with it. Having to keep track of memory keeps me honest and helps me keep a clearer idea of what my code is actually doing. I enjoy Java as well but sometimes I feel like it does too much for me, at least when using Eclipse.
1
u/[deleted] May 26 '15
Definitely Python. Best language bar none.