Rosetta Code:Village Pump/Task organization

Revision as of 06:36, 24 February 2009 by MikeMol (talk | contribs) (→‎Type algebra: I don't think it will be a problem.)

Type algebra

Further restructuring. I propose to group the tasks related to the language types algebra under this category, like it was done with control flow statements. A types algebra is a set of predefined types and the operations constructing new types out of given ones. For example, the array type is produced by such an operation. It takes the type of the index, the type of the element and produces a new container type called array. Here is an incomplete list of algebraic operations most common to higher-level typed languages:

  • Array type construction;
  • Record type construction;
  • Enumeration type construction;
  • Reference/pointer type construction;
  • Parametrization, aka parametric polymorphism of types, aka class template, aka generic type;
  • Inheritance, aka dynamic polymorphism, aka type extension;
  • Type constraining, aka subtyping (non-Liskov subtyping), aka specialization;
  • Type cloning (produces a type which is a copy of the argument type);
  • Class rooted in the type (polymorphism).

The predefined types are well known:

  • Boolean;
  • Integer;
  • Modular integer;
  • Unconstrained integer;
  • String;
  • Floating-point number;
  • Fixed-point number;
  • Complex number;
  • Address.

Partially some of the predefined types are rather constructed by algebraic operations. --Dmitry-kazakov 20:03, 28 October 2008 (UTC)

I worry that this organization will create unnatural distinctions and clutter for languages which do not have or do not emphasize static type systems. --Kevin Reid 00:47, 24 February 2009 (UTC)

Fortunately, MediaWiki categories are not exclusive. This means we can have multiple parallel sorting trees. (As I started to work through last week with the language table, pages and language property templates.) So as long as tasks aren't excluded from creation or other organization by not fitting into this categorization tree, I don't think it'll be a problem. --Short Circuit 06:36, 24 February 2009 (UTC)