What can you do in Haskell that you can't do in Python(for example)?

This page summarizes the projects mentioned and recommended in the original post on /r/haskell

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • returns

    Make your functions return something meaningful, typed, and safe!

  • Functional semantics are available in Python, but IMO not that great. List, dict, and generator comprehensions allow you to perform most operations that you would use in a functional first programming language and there are third party libraries like toolz and funcy that implement some of the more advanced operations. The main issue I've found with using Python as a functional language is it doesn't support fluent syntax. With Scala you can do a relatively complex map/filter/reduce operation with syntactic ease list_of_ints.map(x => x*x).filter(x => x%2 ==0).reduce(x,y => x+y) With Python it's just clunky and less readable b/c of support of list comprehension syntax over fluent syntax. sum([x**2 for x in list_of_ints if x % 2 == 0]) A codebase with 5000 lines of the Scala style code will be much readable and maintainable than with the Python style code.

  • funcy

    A fancy and practical functional tools

  • Functional semantics are available in Python, but IMO not that great. List, dict, and generator comprehensions allow you to perform most operations that you would use in a functional first programming language and there are third party libraries like toolz and funcy that implement some of the more advanced operations. The main issue I've found with using Python as a functional language is it doesn't support fluent syntax. With Scala you can do a relatively complex map/filter/reduce operation with syntactic ease list_of_ints.map(x => x*x).filter(x => x%2 ==0).reduce(x,y => x+y) With Python it's just clunky and less readable b/c of support of list comprehension syntax over fluent syntax. sum([x**2 for x in list_of_ints if x % 2 == 0]) A codebase with 5000 lines of the Scala style code will be much readable and maintainable than with the Python style code.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Coconut

    Simple, elegant, Pythonic functional programming.

  • For the most and boring part, that's because all these definitions exist for you in base. If you use relevant libraries, the noise can be hidden for you as well, up to the point where @curry is applied to every Python definition in a module at AST parsing time during module evaluation (that's how Coconut implements its syntax on top of Python runtime).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts