TWiki . Dev . TypeAlias

Arjan has mentioned this a couple of times.

Given that Nice is more than an OO language, do we need more than the ability to define a new object?

(On a related subject, maybe it's worth (no pun intended) mentioning that subrange types were removed from Modula-2 in the transition to Oberon-2, too complicated with too little benefit. Probably worth considering subranges separately.) see also CheckedIntegerArithmetic

-- IsaacGouy - 31 Dec 2003

The purpose of a TypeAlias is improve readability by being able to replace long types which are used in multiple places in the source code. Making a subclass or interface is not always possible because that can have semantic side-effects.

Thingy = Map<Foo<Bar>, List<String>>
MyFunction = (List<Foo>, Bar, int, String)->int
Another advantage is that TypeAlias could make explorative programming easier. When you don't know yet which type to use, you can use a TypeAlias so that changing the type don't require that much changes all over the place anymore.

-- ArjanB - 01 Jan 2004

And 'Thingy' & 'MyFunction' showing up in error messages?

-- IsaacGouy - 03 Jan 2004

Preferably but it will be quite hard to implement -- ArjanB - 04 Jan 2004

----- Revision r1.4 - 04 Jan 2004 - 22:04 GMT - ArjanB
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.