[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: one-of and other questions on goo's type system



Benedikt Grundmann <bgrundmann@gmx.net> writes:

> Hello folks,
> 
> I just tried out goo and I must admit I like it :-).  Below are some
> problems and questions I encountered:
> 
> First of all I'm missing something like Dylan's one-of function aka:
> (df one-of (args|...) (app t+ (map t= args)))
> I think it's a reasonable common function to be included.  But maybe I
> just overlooked it.

no it's a reasonable request.

> Which unfortunately happens rather easily as the naming convention
> seems to be use 2 or 3 characters 4 at the most
> :-).  Well maybe I just need some more time to become used to it. (I
> recently programmed a lot in Eiffel credo:
> keystrokes are cheap).

i don't agree.  oft-used words should be short as in english or other
natural languages.  i admit that the def's (e.g., dg dc ...) might be
better with a few more letters.

> Is there a formal type conformance definition?  Especially considering
> t=, t?, t+ and t* .

i've listed the subtyping rules in the manual's appendix.  i haven't
specified all the places that type-checks are inserted nor the actual
formal semantics.  i could definitely tighten the spec.

> How can I declare a class to be abstract?  

no but i would like that.  perhaps the simplest way is to force any
class without children to be abstract as in sather.

> Is there a tool or at least convention to write selfdocumenting
> libraries.  In the style of ocamldoc javadoc ...?

no but we've been discussing possibilities.

jonathan