4 ms·
Folks who have used Elixir in a team environment (as opposed to for personal use), is the lack of types an issue in navigating big/unfamiliar codebases?
by jatins 5y ago
Folks who have used Elixir in a team environment (as opposed to for personal use), is the lack of types an issue in navigating big/unfamiliar codebases?
- lawik 5y agoNot for me. To be fair I didn't have types in PHP, Python or JS either. I wrote about my onboarding thoughts on Elixir here: https://underjord.io/onboarding-to-elixir.html https://underjord.io/onboarding-to-elixir.html
- strzibny 5y agoNo, but I don't come from a typed language. For me, it was an upgrade, because the beautiful docs have type information for most main modules you'll use.
- aej 5y agoI came to Elixir from another untyped language (python) but I've never had any issues. Elixir code often relies heavily on pattern matching return values (ok/error tuples or Structs) so that helps along with typespecs. The fact that the language is compiled is also a big help when it comes to avoiding run-time errors while developing locally. The other thing I appreciate about elixir coming from python (more specifically Django) is that most application-specific code is just modules and functions. There is none of the indirection and abstractions-upon-abstraction I used to have to grok in big python codebases.
- erinan 5y agoI just switched from a Python (with mypy) codebase to a full-time Elixir position a few weeks ago. I thought I'd miss typing but due to the functional nature of Elixir and its pattern-matching, I found out that the code is much simpler to grok. In this case I think that having readable idiomatic code trumps the need for typing. If needed there is type hinting with @spec but it's not used very often (or mostly in libraries?). I can definitely say that it's very fun and productive to work in a Phoenix mono-repo. The development experience is great and I'm really having fun programming again.
- juhatl 5y agoI recently started a new job working on a Elixir codebase. While it took me a while to understand the architecture and conventions (just like with any language, I guess), dealing with types was not a concern when it came to navigating the codebase. Granted, the codebase uses pattern matching, type specs and Dialyzer extensively, which all definitely contribute towards making the navigation easier. Without those tools in use, I can definitely imagine navigation being more difficult.