Thursday, January 24, 2019

Dynamic and Static Programming Language

Static and Dynamic Programming Language

According Wikipedia, there are thousands of programming languages and new ones are created every year. Below is the list of common used languages (I used most of them):

  • ALGOL60 (ALGOrithmic Language, 1960) [Application]
  • BASIC (Beginner's All-purpose Symbolic Instruction Code. 1964) - Philosophy emphasizes ease of use

  • Assembly language - Low-level programming language
  • C (1972) - low-level operations [Application, System]
  • C++ (1983)
  • C# (2000)
  • COBOL (COmmon Business-Oriented Language, 1959)
  • Java (1995)
  • JacaScript (1995)
  • LISP(LISt Processing, 1958)

  • Pascal (1970)
  • PERL (Practical Extraction and Reporting Language, 1987)
  • PHP (Personal Home Page, 1995) - Numeric computation and scientific computing.

  • PL/I (Programming Language One, 1964)
  • Prolog(1972)
  • Python (1991)
  • Tcl (Tool Command Language, 1988)
  • Fortran (Formula Translating System, 1957)




In a statically typed language, every variable name is bound both
  • to a type (at compile time, by means of a data declaration)
  • to an object.
The binding to an object is optional — if a name is not bound to an object, the name is said to be null.
Once a variable name has been bound to a type (that is, declared) it can be bound (via an assignment statement) only to objects of that type; it cannot ever be bound to an object of a different type. An attempt to bind the name to an object of the wrong type will raise a type exception.
In a dynamically typed language, every variable name is (unless it is null) bound only to an object.
Names are bound to objects at execution time by means of assignment statements, and it is possible to bind a name to objects of different types during the execution of the program.

Regular Expression Comparison - Python, C#, Java

Regular Expression Comparison - Python, C#, Java


Evens and Delegates in C#

A nice article describes the events and delegates in http://www.codeproject.com/Articles/4773/Events-and-Delegates-Simplified. Here I give a summary of using events and delegates in C#.


A delegate is a class, it's just a function pointer.


  • Every delegate has a signature, for example: Delegate int MyDelegate(string s, bool b);
  • Consider the following function: private int MyFunc1(string str, bool boo) { ... }
  • You can pass a function and register: var md = new MyDelegate(MyFunc1);
  • Then use the registered function: md("mystring", true);

An event is a message sent by an object to signal the occurrence of an action. 

  • The action could be caused by user interaction such as a button click, or it could be raised by some other program logic, such as changing a property’s value.


https://estore.canon.ca/en-CA/catalog/product-accessories/eos-digital-slr-camera-accessories/batteries-chargers-grips

Followers