Skip to main content
added 381 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131

Be also aware of Rice's theorem. (it applies to static analyzers like Frama-C and compilers like GCC, and all Turing complete programming languages and implementations).

Some programming languages favor expressiveness and declarativity (a lot of scripting languages, but also high-level programming languages like Agda, Prolog, Lisp, Haskell, Ocaml, ...). When the cost of development is important (human time and cost of developers), it is suitable to use them (even if the runtime performance is not optimal).

Other programming languages favor run-time performance (many low-level languages, with usually compiled implementations, like C++, Rust, Go, C, assembler, also specialized languages like OpenCL ...); often their specification allows some undefined behavior. When the performance of the code matters, it is preferable to use these languages.

Of course the performance is related to the compiler or interpreter of your programming language. Some naive compilers (e.g. for C, tinycc) are generating quickly slow code. Some bigger or more complex compiler (for the same C language, gcc) are able to generate (slowly) efficient code.

Some programming languages favor expressiveness and declarativity (a lot of scripting languages, but also high-level programming languages like Agda, Prolog, Lisp, Haskell, Ocaml, ...). When the cost of development is important (human time and cost of developers), it is suitable to use them (even if the runtime performance is not optimal).

Other programming languages favor run-time performance (many low-level languages, with usually compiled implementations, like C++, Rust, Go, C, assembler, also specialized languages like OpenCL ...); often their specification allows some undefined behavior. When the performance of the code matters, it is preferable to use these languages.

Be also aware of Rice's theorem. (it applies to static analyzers like Frama-C and compilers like GCC, and all Turing complete programming languages and implementations).

Some programming languages favor expressiveness and declarativity (a lot of scripting languages, but also high-level programming languages like Agda, Prolog, Lisp, Haskell, Ocaml, ...). When the cost of development is important (human time and cost of developers), it is suitable to use them (even if the runtime performance is not optimal).

Other programming languages favor run-time performance (many low-level languages, with usually compiled implementations, like C++, Rust, Go, C, assembler, also specialized languages like OpenCL ...); often their specification allows some undefined behavior. When the performance of the code matters, it is preferable to use these languages.

Of course the performance is related to the compiler or interpreter of your programming language. Some naive compilers (e.g. for C, tinycc) are generating quickly slow code. Some bigger or more complex compiler (for the same C language, gcc) are able to generate (slowly) efficient code.

mention pragmas etc...
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131

Also, some programming languages evolved by adding annotations (as pragmas or comments) to existing languages. For examples, think of ACSL (a comment-extension to annotate C programs to enable their proofs by Frama-C) or of OpenCL (a C dialect to program GPGPUs) or OpenMP or OpenACC #pragmas or Common Lisp type annotations.

PS: there are also social or organizational or historical reasons to mix programming languages; I'm ignoring them here, but I know that in practice such reasons are dominant. Read also The Mythical Man Month

PS: there are also social or organizational or historical reasons to mix programming languages; I'm ignoring them here, but I know that in practice such reasons are dominant. Read also The Mythical Man Month

Also, some programming languages evolved by adding annotations (as pragmas or comments) to existing languages. For examples, think of ACSL (a comment-extension to annotate C programs to enable their proofs by Frama-C) or of OpenCL (a C dialect to program GPGPUs) or OpenMP or OpenACC #pragmas or Common Lisp type annotations.

PS: there are also social or organizational or historical reasons to mix programming languages; I'm ignoring them here, but I know that in practice such reasons are dominant. Read also The Mythical Man Month

Correct book title. And give author name make change >6 chars. (The typo in the book title was _really_ bugging me.)
Source Link

Read Michael L. Scott's book Programming LanguagesLanguage Pragmatics

Read Michael L. Scott's book Programming Language Pragmatics

,
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 30 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 340 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 484 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
improve spelling, mention UB
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 55 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 257 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 248 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 248 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 318 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 40 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
deleted 10 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 112 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 112 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 608 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 305 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 570 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 64 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 805 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 805 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 805 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading
added 805 characters in body
Source Link
Basile Starynkevitch
  • 32.7k
  • 6
  • 87
  • 131
Loading