4 ms·
Ask HN: 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.
- karterk 7y agoraises 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/ 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.
- verdverm 7y agoNot so much back, but use both daily. Mainly Golang, JS/TS,prefer typed languages bfor production, dynamic for early work.
- SamReidHughes 7y agoI'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.
- valand 7y agoDo 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 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.
- Nicksil 7y agoNon-mobile: https://en.wikipedia.org/wiki/Strong_and_weak_typing https://en.wikipedia.org/wiki/Strong_and_weak_typing
- TheThickOfIt 7y agoI 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.
- imhoguy 7y agoPython and Ruby are dynamic and strongly typed. Possibly you meant static typing.
- srijanshetty 7y agoI 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.
- tcbasche 7y agoPython 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.
- UK-Al05 7y agoI never left
- cpursley 7y agoWith your C# and Elixir functional programming backgrounds, you may want to check out F#: - https://fsharp.org/about/index.html https://fsharp.org/about/index.html - https://fsharpforfunandprofit.com/why-use-fsharp/ https://fsharpforfunandprofit.com/why-use-fsharp/
- BWStearns 7y agoWent 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.