Programming languages and what can they be used for?
MichelleA8 (2)

I'd like to know what you can create with certain programming languages. (ex: Java is used for android apps. C++ is used for 3D simulation)

You are viewing a single comment. View All
mwilki7 (147)

Technically, since they are all Turing complete, they can all do what the other can. Though each has certain features that makes it easier to do some things than others.

TL;DR :

C/C++ - generic applications, lots of use in hardware, operating systems use these since they are fastest among the other languages (except assembly)
Java - generic applications, games, servers, capable of gui/web/networking but requires extra effort
Python - generic applications, games, servers, dynamic types and garbage collection help speed up programming but makes it easier to create errors like JavaScript
HTML/JavaScript - web programming, browser supports them so they require the least effort to build web pages, lack of type checking, really easy to see output in your web page but also easy to miss errors you have made because of lack of type checking
F#/OCaml/LambdaCalc - Interpreters, mathematics, complex programs that need to be proven correct to run
SQL - (written in C) used to get certain data from a database file

more verbose answer:

please comment for corrections

Types of programming languages:

Static typed - all variables are checked for correct usage before running program, harder to run program, but harder to run with errors
Dynamically typed - all variables are checked for correct usage as soon as program uses those variables

Compiled - human-written code translated to machine code before running program
Interpreted - human-written code translated to machine code while program runs

Format specific (looking at you python) - requires functions and loops to have code below them to be indented
Format unspecific - only requires lines to be separated by new lines or semi colons

Garbage collected memory management - programmer not responsible to tell computer to release any used memory
User controlled memory management - programmer is responsible to free up what they use

C/C++

  • Compiled
  • Static typed
  • User controlled memory management
  • Format unspecific

Used a lot on embedded systems like hardware, networking, operating system code (mostly), and some game engines. Hardest to get to work perfectly but when it does, it's the fastest (besides assembly).

Java

  • Goes through 2 rounds of interpreters/compilation
  • Static typed
  • Garbage collected
  • Format unspecific

General application programming. Garbage collected so less is on the programmer's mind in terms of developing a non-crashing program. The natural support for object oriented programming guides the behavior of programmers to develop such applications when using it. It can do just as much network programming as C/C++ can with its own socket library.

Python

  • Interpreted
  • Dynamically typed
  • Garbage collected
  • Format specific

Has lots of applications. Anywhere from GUI building, networking, application development. It's interpreted so it's not as fast as C/C++ or maybe Java, still the uses of Python outside of devices are many.

HTML/JavaScript

  • Interpreted
  • Dynamically typed
  • Garbage collected
  • Format unspecific

Easiest to do web apps with these two. So many examples online and source code to get you started. Java/PHP/Python can also do this (or even C++ if you're diligent enough) but need extra tools to get set up. BUT not type checked so debugging is really difficult if you don't adhere to a consistent programming format.

TypeScript

  • Interpreted twice (to JavaScript then to machine readable code)
  • Static typed
  • Garbage collected
  • Format unspecific

Typechecked JavaScript to resolve the problem of JavaScript not telling you something is wrong until it happens instead of before. It is to help programmers follow a more constrained environment for programming to reduce errors.

F#/OCaml/LambdaCalc

  • Interpreted
  • Dynamically typed
  • Garbage collected
  • Format specific

Functional languages often used in logic programming where you would like to know if a program you wrote is mathematically correct without running it. Often used in interpreters but can be used for anything else like any other language (but good luck trying :v   )