Ask HN: Anyone ever come back _to_ strongly typed languages?

10 points by sergiotapia ↗ HN
I'm originally a C# developer, back in 2005.

I moved to Rails a long time ago, and recently (4 years ago) moved to Elixir.

With dotnet core, I gave it a shot and it was pretty refreshing and comforting to have the safety of types in my language again.

Has anyone here moved back to a typed language successfully? I'm seriously flirting with C# dotnet core.

12 comments

[ 3.0 ms ] story [ 37.5 ms ] thread
raises hands

Most of my early carrier involved PHP, JavaScript and Python. I started appreciating type systems only when I began working on larger code bases. Types might slow you down initially but I personally find it very comforting to have that extra safety once the codebase crosses a certain size.

Most of the bad rep that statically typed languages get are from a bygone era that involved a lot of typing. That has changed a lot now. With better IDEs and languages with implicit type inference, it's a lot less verbose these days.

I have been writing a search engine in C++ (https://github.com/typesense/typesense/) and even C++ with the auto keyword and Clion IDE is no longer as verbose. And type safety has saved so many potential bugs.

However, for web development though, there are far less options. I hope more dynamically typed languages allow optional types in future. That's where the world is heading towards.

Not so much back, but use both daily. Mainly Golang, JS/TS,prefer typed languages bfor production, dynamic for early work.
I've found TS a huge win over JS.

The only reason people didn't use statically typed languages in some of the recent past was because they sucked.

Part of the reason is, it's a lot easier to play with handy ergonomic features with a dynamically typed language (especially if you don't know the right stuff). So dynamically typed languages took a lead for a while.

I personally prefer strongly typed languages for almost everything except the most basic of scripts. In my opinion it's very little overhead and helps me keep track of what I'm working with.
Python and Ruby are dynamic and strongly typed. Possibly you meant static typing.
I think developers all over are converging on the idea that we need type safety. Python has typing now, TS is JS with typing (pardon me for the oversimplification), and golang which is taking the world by a storm is a statically typed language.

Also, ease of typing has come a long way today with Type Inference in most languages with C++ leading the way with auto keyword and Java implementing local type inference.

Looks like we're Going back to the Future with static typing.

Python doesn't _really_ have typing though. It's more a method of documentation really (right now, anyway)

edit: to clarify, I wouldn't say the type hints put Python in the realm of a statically typed lang (how could it ..) but it's a step in the right direction.

Went from Python to Haskell. About to head back to Python for new work, but I will miss the hell out of the type system. Yeah the ecosystem isn't quite up to snuff in Haskell but man does it cut down on bugs. Hopefully the QoL libraries continue to evolve and eventually it becomes a no-brainer.