Update
This commit is contained in:
parent
91a4ce4727
commit
810a5262e4
8 changed files with 47 additions and 39 deletions
|
@ -39,7 +39,7 @@ Which prints:
|
|||
We divide programming languages into different groups. Perhaps the most common divisions is to two groups:
|
||||
|
||||
- **compiled** languages: Meant to be transformed by a [compiler](compiler.md) to a [native](native.md) (directly executable) binary program, i.e. before running the program we have to run it through the process of compilation into runnable form. These languages are typically more efficient but usually more difficult to program in, less flexible and the compiled programs are non-portable (can't just be copy-pasted to another computer with different [architecture](isa.md) and expected to run; note that this doesn't mean compiled languages aren't [portable](portability.md), just that the compiled EXECUTABLE is not). These languages are usually [lower level](low-level), use static and strong [typing](typing.md) and more of manual [memory management](memory_management.md). Examples: [C](c.md), [C++](cpp.md), [go](go.md), [Haskell](haskell.md) or [Pascal](pascal.md).
|
||||
- **interpreted** languages: Meant to be interpreted by an [interpreter](interpreter.md) "on-the-go", i.e. what we write we can also immediately run. To run such program you need the interpreter of the language installed on your computer and this interpreter reads the [source code](source_code.md) as it is written and performs what it dictates (well, this is actually simplified as the interpreter normally also internally does a kind of quick "lightweight" compilation, but anyway...). These languages are generally less efficient (slower, use more RAM) but also more flexible, easier to program in and [independent of platforms](platform_independent.md). These languages usually [higher-level](high_level.md), use weak and dynamic [typing](typing.md) and automatic [memory management](memory_management.md) ([garbage collection](garbage_collection.md), ...). Examples: [Python](python.md), [Perl](perl.md), [JavaScript](js.md) and [BASH](bash.md).
|
||||
- **interpreted** languages: Meant to be interpreted by an [interpreter](interpreter.md) "on-the-go", i.e. what we write we can also immediately run; these languages are often used for [scripting](scripting.md). To run such program you need the interpreter of the language installed on your computer and this interpreter reads the [source code](source_code.md) as it is written and performs what it dictates (well, this is actually simplified as the interpreter normally also internally does a kind of quick "lightweight" compilation, but anyway...). These languages are generally less efficient (slower, use more RAM) but also more flexible, easier to program in and [independent of platforms](platform_independent.md). These languages usually [higher-level](high_level.md), use weak and dynamic [typing](typing.md) and automatic [memory management](memory_management.md) ([garbage collection](garbage_collection.md), ...). Examples: [Python](python.md), [Perl](perl.md), [JavaScript](js.md) and [BASH](bash.md).
|
||||
|
||||
Sometimes the distinction here may not be completely clear, for example Python is normally considered an interpreted language but it can also be compiled into [bytecode](bytecode.md) and even native code. [Java](java.md) is considered more of a compiled language but it doesn't compile to native code (it compiles to bytecode). [C](c.md) is traditionally a compiled language but there also exist C interpreters. [Comun](comun.md) is meant to be both compiled and interpreted etc.
|
||||
|
||||
|
@ -68,7 +68,7 @@ Now that we have a specification, i.e. the idea, someone has to realize it, i.e.
|
|||
|
||||
A new language comes to existence just as other things do -- when there is a reason for it. I.e. if someone feels there is no good language for whatever he's doing or if someone has a brilliant idea and want to write a PhD thesis or if someone smokes too much weed or if a corporation wants to control some software platform etc., a new language may be made. This often happen gradually (again, like with many things), i.e. someone just starts modifying an already existing language -- at first he just makes a few macros, then he starts making a more complex preprocessor, then he sees it's starting to become a new language so he gives it a name and makes it a new language -- such language may at first just be transpiled to another language (often [C](c.md)) and over time it gets its own full compiler. At first a new language is written in some other language, however most languages aim for **[self hosted](self_hosting.md) implementation**, i.e. being written in itself. This is natural and has many advantages -- a language written in itself proves its maturity, it becomes independent and as it itself improves, so does its own compiler. Self hosting a language is one of the greatest milestones in its life -- after this the original implementation in the other language often gets deletes as it would just be a burden to keep [maintaining](maintenance.md) it.
|
||||
|
||||
**So can a language be bloated?** Well, yes, if we consider that a very complicated language just cannot be implemented in a simple, non-bloated way -- we can say the language itself is inevitably bloated. It may contain features that will be rarely used, it may be inelegant etc. However many times when referring to language we just refer to its implementation(s). **How to tell if language is bloated?** One can get an idea from several things, e.g. list of features, [paradigm](paradigm.md), size of its implementations, size of the specification, year of creation (newer mostly means more bloat) and so on. However be careful, many of these are just clues, for example small specification may just mean it's vague. Even a small self hosted implementation doesn't have to mean the language is small -- imagine e.g. a language that just does what you write in plain English; such language will have just one line self hosted implementation: "Implement yourself." But to actually [bootstrap](boot.md) the language will be immensely difficult and will require a lot of bloat.
|
||||
**So can a language be [bloated](bloat.md)?** Well, yes, if we consider that a very complicated language just cannot be implemented in a simple, non-bloated way -- we can say the language itself is inevitably bloated. It may contain features that will be rarely used, it may be inelegant etc. However many times when referring to language we just refer to its implementation(s). **How to tell if language is bloated?** One can get an idea from several things, e.g. list of features, [paradigm](paradigm.md), size of its implementations, size of the specification, year of creation (newer mostly means more bloat) and so on. However be careful, many of these are just clues, for example small specification may just mean it's vague. Even a small self hosted implementation doesn't have to mean the language is small -- imagine e.g. a language that just does what you write in plain English; such language will have just one line self hosted implementation: "Implement yourself." But to actually [bootstrap](boot.md) the language will be immensely difficult and will require a lot of bloat.
|
||||
|
||||
**Can you use multiple programming languages for one project?** Yes, though it may be a burden, so don't do it just because you can. Combining languages is possible in many ways, e.g. by embedding a [scripting](scripting.md) language into a compiled language, linking together object files produces by different languages, creating different programs that communicate over network etc.
|
||||
|
||||
|
@ -107,7 +107,7 @@ Here is a table of notable programming languages in chronological order (keep in
|
|||
| [Go](go.md) | **kind of** | 2009 | | 130, proprietary? | "successor to C" but not well executed, bearable but rather avoid |
|
||||
| [LIL](lil.md) | **yes** | 2010? | | | not known too much but nice, "everything's a string" |
|
||||
| [uxntal](uxn.md) | **yes** but SJW | 2021 | 400 (official) | 2? (est.), proprietary | assembly lang. for a minimalist virtual machine, PROPRIETARY SPEC. |
|
||||
| **[comun](comun.md)** | **yes** | 2022 | < 5K | 2, CC0 | "official" [LRS](lrs.md) language, WIP, similar to Forth |
|
||||
| **[comun](comun.md)** | **yes** | 2022 | < 3K | 2, CC0 | "official" [LRS](lrs.md) language, WIP, similar to Forth |
|
||||
|
||||
## Interesting Languages
|
||||
|
||||
|
@ -122,4 +122,4 @@ There is a community around so called **[esoteric programming languages](esolang
|
|||
- [esoteric programming language](esolang.md)
|
||||
- [constructed language](conlang.md)
|
||||
- [pseudocode](pseudocode.md)
|
||||
- [compiler](compiler.md)
|
||||
- [compiler](compiler.md)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue