On Nov 10, 2011, at 7:42 AM, David Rajchenbach-Teller wrote:
- How do you compile the following extract?
fn call_fooT(x: T) {
x.foo();
}
You don't. If you wanted to write `call_foo()`, you would probably write:
iface has_foo { fn foo(); }
fn call_foo(x: has_foo) {
On 11/11/2011 07:29 AM, Niko Matsakis wrote:
In principle, it might be nice to allow something like bounded polymorphism:
fn call_fooT:has_foo(x: T) {
x.foo();
}
Without subtyping, it would make less sense. Perhaps it corresponds
to
passing the vtable that converts a `T`
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/8/11 5:18 PM, Patrick Walton wrote:
The **new** keyword delimits the constructor inside the class
declaration. It is not used to create instances of the class;
rather, the class declaration results in the introduction of the
constructor
On 08/11/2011 8:18 AM, Patrick Walton wrote:
Hi everyone,
I've been working on this for quite a while, and I think it's time to
get it out in the open. I tried hard to keep this as minimal as
possible, while addressing the very real issues in expressivity and
developer ergonomics that we have
Just a couple detail responses:
- Overall: technically strong proposal, but I'm lukewarm about doing it,
and definitely don't want to *now*. In order, I'd prefer to finish
what we've got scoped for the next while, then explore Niko's
sketch, then get to this if we find it necessary.
I
On 11/8/11 9:12 AM, David Rajchenbach-Teller wrote:
Does this mean that we can only have one constructor?
If we wish to have several constructors – and if we accept that they
must not have the same name – the class could yield a full module, in
which each constructor is a function.
Yeah, we
- The trait/class/interface split, while I think elegant and
conceptually accurate when it comes to what's often under the covers
in OO systems, is conceptually *heavy* to users: it makes you think
an lot about OO-design-theory to write code in. It also carries a
high engineering cost to
In case it's not clear, I should add that I like the proposal overall. It
feels reminiscent of C++ in that you have fine-grained control over the costs
of your abstractions but without the overwhelming complexity that C++ brings to
the table.
Niko
On Nov 8, 2011, at 10:04 AM, Niko Matsakis