r/functionalprogramming • u/kichiDsimp • Jul 08 '25
Question why not Lisp/Haskell used for MachineLearning/AI
i have a course on topic of AI: Search Methods and it the instructor told about Lisp, found out it was a func-lang, also told about functions like car & cdr why in the real world of AI/ML func-langs aren't adopted more when they naturally transfom to operations like, map->filter->reduce->functions
am I missing something ?
56
Upvotes
View all comments
Show parent comment
4
u/QuirkyImage Jul 09 '25 edited Jul 09 '25
Because early AI was based on search, path finding etc which are a good fit as list based problems. The other area were knowledge bases, you can use LISP for a knowledge base but logic programming became its own niche with languages like Prolog. You also had genetic algorithm programming where programs write programs LISP is a good fit “code is data, data is code”. However, you wouldn’t really want to build a neural network in LISP or Prolog whilst you can they aren’t the best fit hence C and C++ were still used. Java was also used perhaps not so much these days. We now represent neural networks as tensors (matrix like) which we tend to pass to GPUs for computation, most low level APIs for GPUs are C/C++ based. When we use languages like Python today we are still using C/C++ based Python bindings as binary extensions for performance. Functional programming language AI and ML libraries are most likely developed this way as well.