Jonathan S. Shapiro wrote: > BitC is both object-disoriented and dysfunctional :-). A fairly simple > hack would restore much of the surface idiom of object-oriented > programming, and I would like feedback on whether it should be > considered. > > Syntax hack: > > Given an application of the form > > (a.x [args]) > > we first attempt to resolve 'x' as a field name within a. If no > such field name exists, we rewrite the application as > > (x a [args]) > > and see if we can resolve that. > > This is nothing more or less than a disgusting hack, but I sort of > suspect that it would work most of the time. > > Alternative: instead of overloading "." (which is what makes this > horrible) we could use some other form of punctuation, in which case > this is pure sugar.
I would definitely opt for picking some other punctuation in this case. The '.' operator is already quire overloaded: 1) Select fields from structures (including constructors) 2) Select constructor name from a type name (ex: list.cons) 3) Select bindings from interfaces The programmer might also get unexpected error messages due to over-overloading. Swaroop. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
