News for hackers. Stuff that matters.
Re:Ask HN: If I only learn one static typed language, which ... by tmoaad on Tuesday June 23, 2020 @10:04PM (#23623116)
I might go against the grain here, but if I've had nothing but pure bliss working in Java.

If you're just starting out, Head First Java is the way to go. Then expand your knowledge, look at things like Lombok, or go for one of the languages built on the JVM (Kotlin/Scala). Want insane performance out of the box? Look at Vert.X. There's a library for everything as the language has been around since '95.

Re:Ask HN: If I only learn one static typed language, which ... by gtt on Tuesday June 23, 2020 @10:51PM (#23623468)
I'm actually thinking about Kotlin. What is your experience with it? Is it good?
Re:Ask HN: If I only learn one static typed language, which ... by matanrubin on Tuesday June 23, 2020 @11:27PM (#23623694)
Kotlin is fantastic. As a JVM language with excellent interoperability with Java you basically get all the benefits of Java. Its syntax is succinct and expressive, and it has great features which are not available in Java, such as nullable types, coroutines, extension functions and much more.

If Kotlin interests you, I've heard great things on Scala as well (but don't have first hand experience with it so I can't elaborate).

Re:Ask HN: If I only learn one static typed language, which ... by tmoaad on Tuesday June 23, 2020 @11:33PM (#23623732)
Agreed on all points here, especially the interoperability which brings the benefit of being able to use the massive amount of Java libraries.
Re:Ask HN: If I only learn one static typed language, which ... by tmoaad on Tuesday June 23, 2020 @11:31PM (#23623721)
Introspectively, I found that I could achieve a large portion of the Kotlin features with Java8+JavaRX+Lombok but I could see a very strong argument for "Why do I have to learn 3 technologies when I can get everything for free with Kotlin".

Additionally, Kotlin is highly recommended from the folks at Google with regards to Android.

Re:Ask HN: If I only learn one static typed language, which ... by cercatrova on Thursday June 25, 2020 @12:18AM (#23636858)
If you want a safer and faster Python, use Nim. That's literally what it was made for.

If you want to learn functional programming, learn Rust or Haskell. Rust is more pragmatic and is used more than Haskell, but Haskell has more FP features.

I recommend against Go because it's not really FP, and it has a lot of language inconsistencies compared to Rust for example.

Re:Ask HN: If I only learn one static typed language, which ... by sloaken on Wednesday June 24, 2020 @06:51AM (#23626432)
My go to plan is based on debuggers. So whichever language you can find a GREAT debugger in is the one to go with.

Second criteria would be a language which I knew an expert in. There are plenty of good languages, but when you are stuck or need advise, there is nothing like being able to call up your brother and 'discuss' how you plan to do things.

Portability is a nice feature, but with all the available virtual environments, it is less important. Although I must say to be able to occasionally program on my phone, during a boring meeting, would be nice.

Re:Ask HN: If I only learn one static typed language, which ... by yagodragon on Thursday June 25, 2020 @09:30AM (#23640493)
Go is probably the best candidate for a safer and faster python. However, if i had to choose only one statically typed language to learn that would be Java. The language is super popular, the tooling is great. There are tons of learning resources and books. It's used by big tech companies(amazon, google etc) for some serious engineering work. It opens up the door to the jvm world where you can also explore languages like kotlin, scala and clojure.
Re:Ask HN: If I only learn one static typed language, which ... by auslegung on Tuesday June 23, 2020 @09:46PM (#23622989)
If you’re just wanting a safer and faster Python you probably want Go or Rust. I’m very biased towards Haskell and love it so I’m going to recommend you at least read about its pros/cons (don’t get bogged down with syntax or monads yet, just read about what problems it solves).
Re:Ask HN: If I only learn one static typed language, which ... by bnchrch on Wednesday June 24, 2020 @12:01AM (#23623950)
Well I mean you kind of have to get bogged down with monads since it's the only way to do something with IO, i.e. useful.

(Though I'm biased because I think Haskell is a terrible language for everyday usage :P )

Re:Ask HN: If I only learn one static typed language, which ... by photawe on Wednesday June 24, 2020 @05:59PM (#23634353)
I would recommend C#. It's really really amazing, you can do both OOP and FP, and Visual Studio is quite well at handling really large projects.

Debugging is also a bliss.

Re:Ask HN: If I only learn one static typed language, which ... by ttymck on Tuesday June 23, 2020 @09:34PM (#23622904)

    answer, err := GetAnswer()
    if (err != nil) {
      return "Rust"
    }
(but yes, you probably want Go)
Re:Ask HN: If I only learn one static typed language, which ... by verdverm on Tuesday June 23, 2020 @08:41PM (#23622475)
Go

There is a poll HN feature if you are curious

Re:Ask HN: If I only learn one static typed language, which ... by JS2Java on Tuesday June 23, 2020 @08:28PM (#23622352)
Go or Nim.
Re:Ask HN: If I only learn one static typed language, which ... by bjourne on Thursday June 25, 2020 @06:37AM (#23639051)
Learn C or Java. Those languages will be around forever.
Re:Ask HN: If I only learn one static typed language, which ... by smlckz on Thursday June 25, 2020 @07:23AM (#23639341)
Why no one talking about OCaml?
Re:Ask HN: If I only learn one static typed language, which ... by k0t0n0 on Thursday June 25, 2020 @06:27AM (#23638988)
> safer and faster python.

ohh, f# or Haskell

Re:Ask HN: If I only learn one static typed language, which ... by mikecoles on Tuesday June 23, 2020 @08:44PM (#23622502)
Go for Go.
Re:Ask HN: If I only learn one static typed language, which ... by docflabby on Thursday June 25, 2020 @02:36PM (#23643952)
C++