Hacker News new | past | comments | ask | show | jobs | submit login

There's a balance with both expressiveness and type systems. Too little (PHP, JavaScript) is suboptimal, and too much (Scala, Haskell, Rust) is also suboptimal. Please note it depends very much on what you're building, as to where that tradeoff lies. For some things I use Rust. For others I use JavaScript. I don't touch PHP, Java, Scala, or Haskell for anything in the world - you can't practically pay me enough to want to work with them. For me, for web applications and server side software, Go is in the sweet spot more than any other language I've tried, and I've tried almost 30 by now.

Go is not always elegant, it's not always the right tool, and sometimes frustrating - but it's incredibly good at enabling better productivity than the alternatives in this niche. Sample size of one, this is my opinion, and other disclaimers apply.






> Too little (PHP, JavaScript) is suboptimal, and too much (Scala, Haskell, Rust) is also suboptimal.

I find myself thinking the exact opposite. When you want to do something quick and dirty JavaScript or Ruby are my go to. When you want to do something right, do it in Haskell or Rust.

The middle of the road options I find are worse for anything.

Unless you want to hire big teams. Java, C#, Go are great for that.


I agree about quick and dirty, Python has been my goto there for over a decade.

But I find with more complex type systems and more expressive languages (which applies to both Haskell and Rust) I spend too much time thinking of which way in going to code something, what abstractions I'm going to use. Then I spend too long trying to make the compiler happy for decreasing marginal returns in reducing bugs. Then the compiler takes too long every time I want to run it. On top of all that, the tools are subpar. I like Rust, I find it so well thought out and elegant, but I still reach for Go to get things done.

All of that makes me considerably less productive. In Go I just use loops, slices, structs, and interfaces. There is usually only one obvious way to do it. It compiles right away, and I get on with my life.

It's not as pretty to look at, probably more lines of code, but it takes so much less time.

On larger teams having simple, consistently styled code is an understated advantage for code review and understanding the system (which together are probably 3/4 of the job.)


I think it indeed heavily depends on your marginal return in reducing bugs. I agree Rust is unsuitable for most software, because rightly or wrongly, bugs don't matter in most software.

Some of the bugs that Rust prevents do matter in most software but only occur in languages without GC.

In my view, Rust has a good chance of gradually replacing C++, because C++ devs don't shy away from using a large, complex language, and they can appreciate what the borrow checker does for them.


Yeah, that's where I use Rust now, where I previously would have used C or C++ (and if I previously needed C I always used C++ with extern "C".) These are places where I can't use Go because I need a language without a heavy runtime.

I use TypeScript for the browser and React native, because that is much better done in JavaScript land.

For short scripts I use Python.

Everything else I use Go.


I have found with typescript that having a gradual, structural type system actually helps with quick and dirty prototyping, as it allows me to notate data structures. It's hard to find a reason to use JavaScript.

Note that type errors in typescript are actually just warnings and you can ignore them. I never do, but you can.


I've had similar success with the gradual typing in Python. NamedTuples are far superior to ad hoc dictionaries, for both documenting data structures, but also as a prompt to consider the software structure.

I wasn't aware that typescript type errors were only warnings. Every webpack/typescript project I've used must have had the typecheck set to error, leading me to believe typescript was some draconian type checker akin to Rust or Haskell.


I am getting old and I am also finding I have just settled to languages I feel hit that balance for me.

Racket for general programming (It really is the best for people learning to program and also great for making fun programs that is super easy to install on multiple of computers)

R for statistics especially since I found the functional backbone of the language.

Go for backend work.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: