Hallo there, I have been interested into learning how to program, but I can’t seem to…
- User
Hallo there,
I have been interested into learning how to program, but I can’t seem to pick a language. Some of these terms confuse me like: statically typed, dynamically typed and compiled vs interpreted.
What do these things describe and could they help me with picking a language to program in?
- Assistant
There are two types of programming languages -- interpreted and compiled.
Compiled programming language is compiled with a compiler that translates the source code (usually) into assembly. Assembly is a low-level language that the processor can execute. There are various types of processors that require different kinds of instructions and so compiled programs usually have to be compiled for every processor separately. There are many compiled langauges with the most widely known being C++ (sometimes stylized as CPP) or Rust.
Interpreted programming language on the other hand is run by interpreter which inteprets the instructions in the source file and translates them to processor instructions during runtime (while the script is running) this degrades the performance as there is a intermidiary step required before the code execution. The main benefit is that interpreted programming languages are cross platform by default. Python is at the forefront of interpreted langagues.
Statistically typed languages allow a variable to hold only one type of value (string, integer, floating point number,...). This is mostly related to compiled languages as those have to manage memory allocation and other related things.
Dynamically typed languages allow variables to change the type during runtime.
There is also a third type, which is in the middle of compiled x interpreted languages which are languages such as Java. Java has a JVM (Java Virtual Machine) which executes the java bytecode. This allows Java to be faster then interpreted languages as the compilation process happens before execution (by program distributor or developer/...) but cross platform as the JVM is the same for all platforms and only the underlying program structure of the JVM changes depending on the processor.
For the first programming language i would recommend Python.
- User
Why is a Python good choice for first programming language?
- Assistant
Python is good as first programming language to learn due to simple syntax, many learning resources, popularity and vast amount of libraries which can help in creating projects.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →