Cantor Language Features

Summary of the features of the programming language and its future Cantor compiler. The italicized items would be disclosed later.

What Cantor language has

  • Type inference, lambdas, closures and partial application of functions.
  • Variables and procedures.
  • Classes and namespaces - nested classes.
  • Multiple inheritance from one-to-abstract classes.
  • Generalizations ("generic" templates) - parameterized classes.
  • Abstracting operations - generic alternative operator overloading.
  • Prototyping and copy facilities - operator new from.
  • Exceptions and processing.
  • Declarative import external functions with these calling conventions: cdecl, fastcall, mcall, optlink, pascal, register, safecall, stdcall, syscall, thiscall.
  • Declarative import of OLE/COM/ActiveX interfaces.
  • Wiki markup – easy and independent of the target environment formatted text abstraction.

What Cantor language has not

  • Functions and classes that you can not declare syntax.
  • Implicit default. A large part of the possible omissions and abstracted architectural permitted, all other defaults are explicitly defined in the configuration or equal to null.
  • Uninitialized variables.
  • Call functions as the procedures (with the loss of results).
  • Built-in functions.
  • Built-in types. The only type - class, the word "class" and "type" - synonyms.
  • Divisions types into simple and all the others, packing and unpacking values (boxing and unboxing).
  • The constructor and destructor.
  • Garbage collection. Cantor - system programming language.
  • Pointer and reference types. At the announcement of the reference ref keyword is always given explicitly.
  • Keyword begin. Block operators always allow multiple nested, separated by semicolons, and must be completed end. In some cases, the number following each other end is reduced due to the combination of syntactic units.
  • Operators of the cycle. Instead cycles - iterators and protection of expressions.
  • Keyword try.
  • Unhandled exception.
  • Labels and goto.
  • Monad. Instead of monads - full procedure.
  • Macros, conditional symbol preprocessor and compiler directives. Instead of them - generalization operators if and case.
  • Includes file directives exports and imports. Address class full names, then scoping public and protected.
  • The concepts of the file and the console, as well as built-in language operators or functions IO.

What Cantor is different from other languages

  • The constants, variables, procedures, functions, methods, properties, lambda and closures - this function. In Cantor only one computable entity - function.
  • Classes, interfaces, namespaces, impurities, Valais and synthesis - it classes. In only one Cantor aggregating essence - class.
  • Class - also feature, so acceptable overloaded classes, generalized tuples and partial use of generalizations.
  • Structures (records), enumerated types, sets, lists, lines, static and dynamic arrays - are classes. They are declared as classes, inheritance and permit generalization.
  • Strings - it's not arrays of bytes or words, and classes that encapsulate all the action for the storage and processing of the data string. By generalization describes a string of sequences of bytes of short and long words with character sets based on the code page, UTF-8, UTF-16 and UTF-32, with little and big endian byte.
  • Operator if - syntactic sugar operator case.
  • Block new.
  • Container arithmetic.
  • Address arithmetic is implemented as an unsafe extension of certain classes and is designed for importing code in other languages. Included is the command line options is disabled by default.

What is different in Cantor compiler (environment)

  • Object code is primary and reversible. Source code is a temporary condition in which the code is translated to read and edit by human.
  • Because of the reversibility of the object code, there are several variations of a one-to-one syntax, in the future, may be localized syntaxes of Cantor.
  • The collection of code is object-oriented database which respects the objects relationship: inheritance, polymorphism, and aggregation, monitored peer links.
  • Input language is not only to write programs and libraries, but also for project files, forms and configurations - all of this is written in Cantor.
  • There is an API for connecting domain-specific languages (DSL) modules (plug-ins) to the compiler.
  • All warnings are treated as an error and stop compilation - in strict syntax checking mode (warnings as errors), is enabled by default. For debugging purposes, you can temporarily disable this mode by command line key.

Best practice

Cantor developer's qualification is inversely proportional to the number of variables in his code.

Комментариев нет :

Отправить комментарий

Выбрав в выпадающем списке пункт «Имя/URL», можно оставить комментарий от своего имени без предварительной регистрации.

Примечание. Отправлять комментарии могут только участники этого блога.