Which programming language is best? That question may never be answered. AI engineers and scientists can choose from a variety of programming languages that best suit their needs.

Medium by Claire D. Compiled by Heart of the Machine with Li Shimeng and Mayonnaise.



Someone once compared programming to cooking, and that programming language is the first thing to prepare the ingredients or utensils.
C: A kitchen knife, a wok, a good range, and there’s a vegetable market next door.


Java: Vegetable shredder, vegetable slicer, meat Grinder, dough mixer, oven, microwave…


Python: The freezer counter at the big supermarket, ready to go, half-finished to go, everything. It’s a quick way to get to a table that’s still edible, but it’s not so easy to delve into flavors and heat.


C++ : a set of top kitchen utensils, light knife on a dozen, cutting meat slices carved; POTS of stir-frying, smouldering pan-fried meat, fried eggs, stews… People who try to master this tool in 21 days often end up cutting themselves or blowing up the kitchen.

Choose self-knowledge on users: www.zhihu.com/question/28…


While there are many programming languages that can meet your needs when you start AI development, there is no one-stop-shop for AI programming, as different goals require specific approaches within each project.


As with cooking, the process of becoming a “master” is to find the programming language that works best for you.


Python
Python is the most powerful language to read. – Pau Dubois

Python programming. Source: Unsplash.



Python was developed in 1991, and a poll showed that over 57% of developers chose Python over C++ as their preferred programming language when developing AI. Because it’s easy to learn, Python makes it easier for programmers and data scientists to enter the world of developing AI.


Python is an “experiment” in how much freedom a programmer needs. So free that no one can read anyone else’s code; Too not free, will not be so strong expression. Guido van Rossum

With Python, you not only get excellent community support and an extensive library set, but you also get flexibility. The biggest benefits you’ll probably get from Python are platform independence and an extensive framework for deep learning and machine learning.
The joy of coding in Python is to see short, readable classes that can express a lot of behavior in a small amount of clean code (rather than boring the reader with a lot of code). Guido van Rossum

Examples of Python code snippets:


Examples of Python code paragraphs.



The commonly used libraries
  • TensorFlow — for machine learning workloads and processing with data sets;

  • Scikit-learn — Training machine learning models;

  • PyTorch — Computer vision and Natural Language processing;

  • Keras — code interfaces for highly complex mathematical calculations and operations;

  • SparkMLib — a machine learning library similar to Apache Spark, with algorithms and utilities to make machine learning easy for anyone;

  • MXNet — another Apache library that simplifies deep learning processes;

  • Theano — a library for defining, optimizing, and evaluating mathematical expressions;

  • Pybrain — For powerful machine learning algorithms.

Additionally, Python has surpassed Java as the second most popular language in the world, based on the contribution of the GitHub library. Stack Overflow calls Python the “fastest growing” mainstream programming language.


Introduction to Python
  • Three Free Introductory Python courses: 2020 Edition

Course links: https://hackernoon.com/3-free-python-courses-for-beginners-2020-edition-j7c23y3u
  • The Full Python Boot Camp: From Nerd to Master with Python 3

Course links: https://www.udemy.com/course/complete-python-bootcamp/?LSNPUBID=JVFxdTr9V80&ranEAID=JVFxdTr9V80&ranMID=39197&ranSiteID=J VFxdTr9V80-lB6TwxSdouentAk36.qjmw


Java
Write it once, run it at any time.

Java is widely recognized as one of the best programming languages in the world, and its use over the past 20 years is proof of that.


With its user-friendliness, flexibility, and platform independence, Java has been involved in AI development in a variety of ways, such as:
  • TensorFlow – Java with apis is also listed among the programming languages supported by TensorFlow. While not as feature-rich as other fully supported languages, they do support Java and are rapidly improving.

  • Deep Java Library — Amazon’s Library for creating and deploying Deep learning capabilities in Java.

  • Kubeflow – Kubeflow makes it easier to deploy and manage machine learning stacks on Kubernetes and also provides an off-the-shelf ML solution.

  • OpenNLP — Apache’s OpenNLP is a machine learning tool for natural language processing.

  • Java Machine Learning Library — Java-ML provides a variety of Machine Learning algorithms for developers.

  • Neuroph — Neuroph designs neural networks using the Java open source framework with the Neuroph GUI.

If Java could be garbage collected, most programs would delete themselves at execution time. – Robert Sewell

Example Java code snippet:

Example Java code snippets.



Introduction to Java
  • Top 5 Online Java Programming 101 Courses — The Best

Course link: https://javarevisited.blogspot.com/2018/05/top-5-java-courses-for-beginners-to-learn-online.html


R


Ross Ihaka and Robert Gentleman published the first version of R in 1995. Now it is maintained by the core R development team. R is the realization of S programming language, which is used for statistical software development and data analysis.


The basic feature of R is its ability to handle large amounts of data, making it a better choice than Python’s less-than-perfect NumPy package; You can use R to deal with a variety of different programming paradigms, such as functional programming, vector computing, and object-oriented programming.


R Applicable AI programming package:


  • Gmodels — provides a set of tools for fitting models;

  • Tm – framework for text mining applications;

  • RODBC — RODBC interface;

  • OneR — Used to implement single-rule machine learning classification algorithms for machine learning models.



Among data miners and statisticians, R is widely used for:


  • A variety of libraries and packages for extended functionality;

  • An active support community;

  • Work well with C, C++ and Fortran.

  • Multiple packages that help extend functionality;

  • Support the generation of high quality graphics.



Prolog


Logic Programming, short for Logic Programming. Prolog first appeared in 1972 and was used to develop artificial intelligence, particularly natural language processing. ELIZA was the first chatbot ever created using Prolog.


The first successful chatbot.




To understand Prolog, you must be familiar with some of the basic terms that guide Prolog’s work:


  • Fact, “Fact,” defines a true statement;

  • A Rule defines a statement with conditions attached;

  • The Goal defines where to submit a statement based on the knowledge base;

  • A Query defines how to make your statement correct and the final analysis of the facts and rules.



Prolog provides two approaches to implementing AI that have been around for a long time and are well known among data scientists and researchers:


  • Symbolic methods include rule-based expert system, theorem proving and constraint-based methods.

  • Statistical methods include neural networks, data mining, machine learning, and others.



Lisp


Create a layer perceptron with n input m cells using Lisp encoding.



Short for List Processing. It is the second oldest programming language after Fortran. Also known as one of the founding languages of AI, it was created by John McCarthy in 1958.


Lisp is a language for the impossible. – Kent Pitman


Lisp, a practical mathematical notation that can be programmed, is quickly becoming the AI programming language of choice for developers. Lisp is one of the best choices for machine learning AI projects because of its unique features:


  • Rapid prototyping;

  • Create dynamic objects;

  • Garbage recycling;

  • Flexibility.



As competing programming languages have made significant improvements, other languages have integrated features specific to Lisp. Notable projects involving Lisp are Reddit and HackerNews.




When it comes to Lisp, it’s the most beautiful language in the world — at least until Haskell came along. – Larry Wall



Haskell




Haskell was founded in 1990 and is named after the famous mathematician Haskell Brooks Curry. Haskell is a purely functional and statically typed programming language that works with lazy computation and short code.


Haskell is a very safe programming language, and because Haskell has fewer errors than other programming languages, it provides more flexibility in handling errors. Even if an error occurs, most non-syntactic errors can be caught at compile time rather than run time. Features provided by Haskell include:


  • Strong abstraction ability;

  • Built-in memory management;

  • Code reusability;

  • Easy to understand.



SQL, Lisp, and Haskell are the only programming languages I’ve seen where you can spend your time thinking rather than typing. – Philip Greenspun


Haskell’s features help increase programmer productivity. Haskell is very similar to other programming languages, but only used by a small number of developers. Challenges aside, Haskell is proving to be just as good as the other competing languages for AI, as usage in the developer community increases.




Julia


Julia is a high-performance, general-purpose dynamic programming language that can be created for almost any application, but is best suited for numerical analysis and computational science. Other tools to use with Julia include:


  • Popular editors like Vim and Emacs;

  • Ides like Juno and Visual Studio.



Julia Source Code Organization.



Julia has some features that make it an important choice for AI programming, machine learning, statistics, and data modeling. These features include:


  • Dynamic type system;

  • Built-in package manager;

  • Capable of parallel and distributed computing;

  • Macro and metaprogramming capabilities;

  • Support multiple dispatch;

  • Direct support for C functions.



Julia is built to address the weaknesses of other programming languages and can be used for machine learning when integrated with other tools such as Tensorflow.jl, mlBase.jl, and mxnet.jl. Julia’s scalability allows you to do much more.


Google Trends — Julia’s Usage Trends.



conclusion


AI engineers and scientists can choose from a variety of programming languages, depending on the needs of the project. Each AI programming language has strengths and weaknesses. As these languages continue to improve, AI development will soon become more comfortable and more people will join the wave of innovation. Great community support makes it easier for newcomers to work, and community contributions to packages and extensions make everyone’s life easier.


Reference links:


Towardsdatascience.com/top-program…