My first language was Racket and so naturally I gravitated to the lispy untyped functional programming style even when I was using languages like Python or Java, but when I tried Haskell for the first time my mind was absolutely blown and I was a convert ever since. What are your thoughts?

  • @mzan
    link
    21 year ago

    I agree. F# has also type providers (https://learn.microsoft.com/en-us/dotnet/fsharp/tutorials/type-providers/) that are a form of type-inference on steroids, for assigning types to external resources.

    IMHO, whenever possible it is better using static typing, but there are real world problems where the nature of data is extremely dynamic, or the types are very complex. In these cases a naive but rigid static type system can be a problem. So in these cases it is better or a relaxed static type system where some constraints can be checked at run-time (i.e. like a dynamic type-system), or a very powerful static type system. In a certain sense, Common Lisp and Racket are examples of the first case, because you can add type annotations to code, so they are both dynamically and statically typed language.