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

Re: Where to use SELF - your opinion

I agree with most of your comments, Peter.  Certainly an interesting discussion.
But one comment of yours I think should be clarified:

> I was trying (in my mind) to separate implementation and language
> characteristics.  I do believe that it is intrinsic that a language without
> static typing will require substantially more runtime overhead -- whether
> space or time -- than one with static typing, to deliver the same average
> level of performance.

I think you're thinking of a kind of static typing that goes beyond mere
protocol checking.  Just knowing protocols often doesn't help performance.
What the compiler needs is additional information about representations and
particular implementations.  Types in C++, e.g., specify both protocol and
partial representation information.  Ideally, the programmer should be able
to say protocol to get type checking and safety, and add pragma-like
annotations to variables or expressions or methods to convey additional
restrictions to the compiler that are expected to improve performance.  This
strategy is in line with my goal of a "high-level systems programming language",
where the semantics of the system is written at a high level, but the programmer
could get control over the generated code through pragma-like things.  As a
test case, I'd like to be able to write the Self or Cecil implementation in
such a language, both the low-level run-time and GC code and the high-level
method lookup and compiler code.

-- Craig