Live data from Hacker News

Ask HN: What is your favourite programming language? Why?

news.ycombinator.com

31–40 of 60 posts

Re: Ask HN: What is your favourite programming language? Why?

#31
post #2

Important not to mistake fluency for favourite. I code mostly in python but I am attracted to lisp and Haskell. Because they have beautiful simplicity in the first case and interesting outcomes in the second. I continue to struggle to achieve expressiveness in either. Maybe before I die. But my real favourite is awk. Because it was the first language I used with a hash structure and so let me explore writing code whi…

There is this oddness between how programming in Haskell feels and programming in Python. Each time I go back to Haskell to try and learn a bit more about that environment, I find the mindset carrying over to what I write in Python.

Something to look forward to!

Thinking in yield() generators goes naturally to composition of functions. That's about my limit.

Re: Ask HN: What is your favourite programming language? Why?

#32
Elm! (Currently.)

I might have said Haskell, except I have very little hands on experience with Haskell.

Elm is such a joy. Here are some reasons!

1. In the end, all your code is either functions or data!

2. There are only a few core concepts, and very little extra language features. There is zero implicit indirection. (E.g. macros or class inheritance.) As a result, it’s incredibly easy to reason about what the code is doing.

3. It’s incredibly straightforward to reason about what code is doing. Function bodies are just a single expression saying what the function returns. Functions are 100% “pure”; they don’t perform side effects, and when you pass in the same input you always always get the same output.

I work in Elixir day-to-day. Elixir’s great, but just today I spent hours digging through internals of Phoenix (the prevailing web framework) to implement a “low level” abstraction in our application. Trying to understand the flow of code in Phoenix was painful! (Because a lot of advanced language features are used that bring more layers of indirection.) Not so in Elm. There’s no objects, no classes, no inheritance hierarchies. Everything is way more concrete and clear from the get go.

Re: Ask HN: What is your favourite programming language? Why?

#35
For fun, Scheme/Lisp. Once you have macros it really feels like the sky is the limit in terms of what you can express.

I've also been liking Go quite a bit recently. I know it's a language HN loves to hate. It's not as expressive as some other languages. But I feel like creativity within constraints can also be rewarding (kind of like writing a haiku). If I can find a way to reformulate my problem so that it can be expressed easily in Go, I'm often happy with the result. And because the abstractions Go provides are not very costly, it usually executes efficiently too.

It's hard to find a language that combines high level features with the lower level features that performance-sensitive apps often need (like value types, control of memory layout, etc). Also GC simplifies a lot of things, and Go makes it practical for a wider class of applications with sub-ms pauses and making it easy to minimize allocations. C++/Rust involve more programmer effort around ownership, and C# can also involve more programmer effort since minimizing allocations is trickier and GC impact is greater. It's not a big language but the combination of features / trade offs seems really practical.

Go's also widely used enough where you don't need to worry about having a robust library if you need HTTP2 or something.

Re: Ask HN: What is your favourite programming language? Why?

#38

Okay, okay... I’ll be the lone Swift user. I really enjoy the type safety and in line parameter names on function calls. Of the type safe languages it feels like it has the minimal about of scaffolding needed to run some code.

swift is really good. But swift-evolution makes me nervous.

Re: Ask HN: What is your favourite programming language? Why?

#39
Klong and T3X, both invented by myself. Klong is a K-like array programming language that I use for all kinds of computations, statistics, and data analysis. T3X is a super-simple typeless low-level language that looks a bit like a cross between Pascal and BCPL. I have also written an awful lot of C code, but it gives me headaches way too often.

See http://t3x.org if you want to have a look at Klong, T3X, and all the other languages I have implemented or invented.

Re: Ask HN: What is your favourite programming language? Why?

#40
Haskell. For programming with immutable values and pure functions, beautiful succinct syntax and strong types. Strong types ensure correctness, but in Haskell, they also help me reason about where and when my effects (such as IO) are happening,

Haskell is now the current inspiration for many object-oriented languages like C# and Java:

http://wadler.blogspot.co.uk/2012/09/brian-goetz-on-future-o...

Post reply on HN