HACKER Q&A
📣 sergiotapia

Anyone ever come back _to_ strongly typed languages?


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.


  👤 SamReidHughes Accepted Answer ✓
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.


👤 cpursley
With your C# and Elixir functional programming backgrounds, you may want to check out F#:

- https://fsharp.org/about/index.html

- https://fsharpforfunandprofit.com/why-use-fsharp/


👤 BWStearns
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.

👤 valand
Do you mean statically typed? People often mistake static typing for strong typing and vice versa.

https://en.m.wikipedia.org/wiki/Strong_and_weak_typing

As for static typing, I moved to TS from JS and will never go back for big projects.


👤 karterk
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.


👤 srijanshetty
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.


👤 TheThickOfIt
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.

👤 verdverm
Not so much back, but use both daily. Mainly Golang, JS/TS,prefer typed languages bfor production, dynamic for early work.

👤 UK-Al05
I never left