4 ms·
I tried implementing an algorithm for tracking multiple objects based on graph-cuts using Elixir. I was disappointed in the lack of strict typing in the languag
by asfarley 6y ago
I tried implementing an algorithm for tracking multiple objects based on graph-cuts using Elixir. I was disappointed in the lack of strict typing in the language, since this is one of the things that made me want to try functional programming.
In order to tell the type of various method signatures, it seems like you have to go looking at other areas of your program. I’m aware that it’s possible to annotate method signatures, but this still didn’t lead me to feel secure. I think I was hoping for/expecting something more Haskell-like.
- atraac 6y agoWhy would you "try to implement" stuff in a language that is clearly dynamically typed and then be disappointed about lack of types? It's like trying Python and being disappointed about it lacking types. Do you often try languages without even googling for a basic description and then are disappointed because it's not like other programming language or what you expected?
- asfarley 6y agoHah, well I was focused on the benefits of functional programming rather than the dynamic aspect of the language. It’s easier to recognize that a feature (dynamic typing) is an issue in some applications after trying it for a while rather than just taking a theoretical view. I’ve sometimes misunderstood how a feature works in practice by relying too much on my theoretical understanding. Also, because Elixir allows type annotations, I was thinking that I might not need static typing. It turned out (at least for me) that I would prefer to have a language that insists on type annotations by default rather than allowing them as options.
- seanhandley 6y agoTo be fair, dynamic typing is a well-promoted feature of the language. The first sentence on the Elixir homepage starts "Elixir is a dynamic, functional language"...