Polyglot programming is also called multilingual programming. It is an art of developing simpler solutions by combining the best possible solutions using different programming languages and paradigms. This is based on the observation that there is no single programming paradigm or a programming language which can suit all the facets of modern day programming or software requirements. It is also called poly paradigm programming (PPP), to appreciate the fact that many modern day software combines a subset of imperative, functional, logical, object-oriented, concurrent, parallel, and reactive programming paradigms.
One of the oldest examples of polyglot programming is Emacs, which is a combination of parts written in both C and eLisp (dialect of Lisp). Web applications are generally based on three-tier architecture to promote loose coupling and modularity, and they are also a representation of polyglot software systems. Polyglot programming has been observed to have increased programmer productivity and software maintainability in web development.
Although the word “Polyglot” has been used in software development since 2002, the definition of Polyglot programming is not standardized yet. Many different definitions by polyglot practitioners have been documented.
One of the definitions says “programming in more than one language within the same context.”
Another one says “using multiple programming languages on the same managed run-time.”
Fjeldberg extends the definition, taking into account the developers’ perspective, as: “programming in more than one language within the same context, where the context is either within one team, or several teams where the integration between the resulting applications require knowledge of the languages involved.”
In a Polyglot programming environment, the platform used for the integration, and the different programming languages supported by the given platform are the two essential aspects. An Inverse pyramid
can be used to categorize the programming languages in a polyglot software system. The Inverse pyramid has three layers: stable, dynamic, and domain, as shown in the figure.
Statically typed programming-languages such as Java and C that provide well-tested and stable functionality settle toward the stable layer.
The less powerful general-purpose technologies, such as HTML and CSS, which are tightly coupled to a specific part of the application, bubble up to the top layer, and the dynamic layer in the middle consists of a variety of programming languages such as Groovy and Clojure, which are more flexible and aid rapid functionality development.
The inverse pyramid signifies the fact that it is the single stable language, which supports all of the previously described layers and various languages in a bedrock fashion.
Since IoT is characterized by heterogeneity in various forms, a single programming language or a single programming model may not be able to provide complete support for the application development in IoT. As we have already argued, at least a coordination language and a computa – tional language is required in a unified programming model for IoT, which, in a way, is polyglot programming.
Programming for IoT is usually a polyglot (multiple languages) effort since the Internet-of-Things (IoT) is a system of inter-related computing devices that are provided with unique identifiers and the ability to transfer data over a network. The choice of programming-language depends on the capability and purpose of the device. IoT encompasses a variety of devices including edge devices, gateways, and cloud servers.
Other languages include Parasail, Microsoft P, Eclipse Mita, Kotlin, Dart, MicroPython, and B#.
IDEs and tools for IoT are many but i list some of them below:
Eclipse IOT project (Kura) – This is a Java-based development framework for IoT applications.
Arduino IDE – This IDE includes support for the C and C++ programming languages for programmable microcontrollers. It’s a complete package with many examples and pre-loaded libraries.
Raspbian – This IDE comes with many packages and examples created specifically for the Raspberry Pi boards.
OpenSCADA – This project is a part of Eclipse IOT Industry Working Group along with Eclipse SCADA (Supervisory Control and Data Acquisition). It provides several libraries, interface apps, and configuration tools.
PlatformIO – This is a cross-platform IDE that supports over 400 embedded boards, and several development platforms and frameworks.