Programming language.
Fournir des instructions à la machine.
Le langage de programmation est un formalisme (généralement textuel) :
On peut distinguer les langages par :
ouvre (porte). On se préoccupe
alors plus des événements qui peuvent survenir dans une application, et de comment ils doivent survenir.
porte.ouvre(). On se
préoccupe alors plus des entités existantes et de leurs relations/interactions.
Un langage est constitué de :
| Nom | Java | JavaScript | Groovy | Objective-C | Ruby | PHP | Perl | Python | C++ | C# | Pascal | Eiffel | Ada | SmallTalk | Commentaire | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Version/ Fournisseur | 1 | 1 | ANSI | Borland | GNU | |||||||||||||||||
| Domaine | Technologie | Produit/ Release | 4 | 5 | 0 | 2 | 5 | Delphi | 95 | |||||||||||||
| Exécution | JVM | Interpréteur | Interpréteur | Machine | CLR | Machine | Machine | Interpréteur | ||||||||||||||
| Compilation | Préprocesseur | Non | Non | Oui | Oui | |||||||||||||||||
| Structures de données | Constantes | <strong>final</strong> |
<strong>S</strong>omeConstant |
const |
<strong>constant</strong> |
|||||||||||||||||
| Enumérations | Non | <strong>enum</strong> MonEnum { a, b, c } |
<strong>enum</strong> MonEnum { a, b, c} |
Oui | <strong>type</strong> MonEnum <strong>is</strong> (A, B, C);
|
|||||||||||||||||
| Numériques | Entiers | <strong>byte short int long</strong> |
<strong>Byte Short Integer Long</strong> |
[<strong>unsigned</strong>] <strong>char</strong>, [<strong>unsigned</strong>] [<strong>long</strong>]
<strong>int</strong> |
<strong>byte short int long</strong> <strong>Byte Short Integer
Long</strong>
|
<strong>INTEGER</strong> |
var<strong>: Integer </strong>var<strong>: Short_Integer</strong> |
|||||||||||||||
| Flottants | <strong>float</strong> |
<strong>Float</strong> |
<strong>float</strong>, [long] <strong>double</strong> |
<strong>float Float</strong> |
<strong>REAL DOUBLE</strong> |
<strong>Float Long_Float</strong> |
||||||||||||||||
| Caractères | Unique | <strong>char</strong> |
<strong>Character</strong> |
<strong>char</strong> (8 bits) |
<strong>char</strong> |
<strong>Character</strong> |
||||||||||||||||
| Chaîne | <strong>String</strong> |
<strong>char*</strong> |
<strong>String</strong> |
<strong>CHARACTER</strong> |
<strong>String </strong>var |
|||||||||||||||||
| Booléen | <strong>boolean Boolean</strong> |
|
<strong>boolean Boolean</strong> |
|
<strong>Boolean</strong> |
|||||||||||||||||
| Enregistrements | Classes | <strong>struct</strong> |
record | Classes | <strong>record</strong> |
|||||||||||||||||
| Type génériques | Templates | Non | Classe<Type> |
Non | Oui | var : Classe[ Type] |
<strong>generic type</strong> MonType |
Modèles ou "patrons" de classes | ||||||||||||||
| OO | Héritage simple | Classe1 <strong>extends </strong>Classe2 |
Class1 | Oui | Classe1: Classe2 |
Non | Oui | Classe1 <strong>inherit</strong> Classe2 |
Oui | Oui | ||||||||||||
| Héritage multiple | Classe1 <strong>implements</strong> Interface1, Interface2 |
Oui | Classe1: Interface1, Interface2 |
Non | Classe1 <strong>inherit</strong> Classe2 Classe3 |
Non | Oui | |||||||||||||||
| Structures de contrôle | Condition | <strong>if</strong> (cond) <br> ...<br> <strong>else</strong><br> ...
|
<strong>if</strong> (cond) <strong>...<br> else<br> ... </strong>
|
<strong>if</strong> cond <br> ...<br> <strong> else<br> ...<br>
end</strong>
|
<strong>if</strong> (cond) ... |
<strong>if</strong> (cond) ... |
<strong>if </strong>cond <strong>then ...</strong> |
|
<strong>if</strong> (cond) <strong>then</strong> |
|||||||||||||
| Cas | <strong>switch</strong> (var) { <br> <strong> case</strong> val1: <strong>break</strong>;
<strong> case</strong> val2: <strong>break</strong>; <br> } |
switch (var) { x: break; } |
<strong>switch</strong> (var) { <strong>case</strong> x: <strong>break</strong>;
}
|
|
|
|
|
|
<strong>case</strong> var <strong>is<br> when</strong> val1 <strong>=></strong>
...<br> <strong>when</strong> val2 <strong>=> </strong>...<br> <strong>end case</strong>; |
|||||||||||||
| Boucle | Itération | <strong>for</strong> (init; while; inc) <strong>...</strong>
|
|
<strong>for</strong> (init; while; inc) <strong>...</strong>
|
someList.<strong>each</strong> <strong>do</strong> <strong>|</strong>someElement<strong>|</strong>
<br> ... <br> <strong> end</strong> |
<strong>for</strong> (init; while; inc) <strong>...</strong> |
<strong>foreach</strong> (var <strong>in</strong> col) ... |
|
|
|
|
<strong>for</strong> var <strong>in</strong> [<strong>reverse</strong>] discreteRange
<strong>loop</strong><br> ...<br> <strong>end loop</strong>; |
||||||||||
| Un au moins | <strong>do</strong> <strong>...</strong> <strong>while</strong>
|
<strong>do</strong> <strong>...</strong> <strong>while</strong>
|
<strong>do</strong> <strong>...</strong> <strong>while</strong> |
|
|
|
|
|||||||||||||||
| Tant que | <strong>while</strong> (cond) ... |
<strong>while</strong> (cond) <strong>...</strong> |
<strong>while</strong> (cond) <strong>...</strong> |
|
|
|
|
|||||||||||||||
| Suite | <strong>continue</strong> |
<strong>continue</strong> |
<strong>continue</strong> |
|
|
|
|
|||||||||||||||
| Stop | <strong>break</strong> |
<strong>break</strong> |
<strong>break</strong> |
|
||||||||||||||||||
| Gestion des erreurs | Exceptions | Oui | Non | Oui | Oui | Non | Oui | Oui | ||||||||||||||
| Robustesse | Contrôle des conversions | Oui | Non | Non | ||||||||||||||||||
| Contrôle des limites de tableau | Oui | Non | ||||||||||||||||||||
| Contrôle division par zéro | Oui | |||||||||||||||||||||
| Gestion mémoire | Pointeurs | Non | Oui | Oui | Oui | |||||||||||||||||
| Allocation | Automatique | Oui | Non | Non | Non | Non | ||||||||||||||||
| Libération | GC | Oui | Non | Non | Non | Non | Oui | Oui | Garantie de robustesse | |||||||||||||
| Mise au point | Assertions | Non | Oui | assert.h |
||||||||||||||||||
| Nom | BASIC | COBOL | PERL | Commentaire | |||
|---|---|---|---|---|---|---|---|
| Version/ Fournisseur | Microsoft | ||||||
| Domaine | Technologie | Produit/ Release | Visual Basic | ||||
| Exécution | Interpréteur | Oui | Oui | ||||
| VM | Non | Non | |||||
| Machine | Non | ||||||
| Compilation | Préprocesseur | ||||||
| Structures de données | Constantes | Non | |||||
| Enumérations | Non | ||||||
| Numériques | Entiers | var% |
32 bits | ||||
| Flottants | var<strong>! </strong>var<strong>#</strong> |
32 bits | |||||
| Caractères | Unique | Non | 32 bits | ||||
| Chaîne | var<strong>$</strong> |
Suite de 32 bits | |||||
| Enregistrements | Non | ||||||
| Type génériques | Templates | Non | Modèles ou "patrons" de classes | ||||
| Structures de contrôle | Condition | <strong>if </strong>cond<strong> then ...</strong> |
|
|
<strong>if</strong> (cond) { } |
||
| Cas | |
||||||
| Boucle | Itération | <strong>FOR</strong> var=exp <strong>TO</strong> exp [<strong>STEP</strong> exp]
|
foreach $var (liste) <strong>...</strong> |
||||
| Un au moins | |
||||||
| Tant que | |
||||||
| Suite | <strong>NEXT</strong> var |
|
|||||
| Stop | |||||||
| Gestion des erreurs | Exceptions | ||||||
| Robustesse | Contrôle des conversions | ||||||
| Contrôle des limites de tableau | |||||||
| Contrôle division par zéro | |||||||
| Gestion mémoire | Pointeurs | ||||||
| Allocation | Automatique | ||||||
| Libération | GC | Garantie de robustesse | |||||
| Mise au point | Assertions | ||||||
| Nom | SQL | OQL | EJBQL | JDOQL | Commentaire | ||
|---|---|---|---|---|---|---|---|
| Version/ Fournisseur | |||||||
| Domaine | Technologie | Release | |||||
| Nom | SGML | |||
|---|---|---|---|---|