[Vala] Interface properties



        Hello,

just another one try to use a property in an interface.

1. It's so unnatural that an implementation of a property must match exactly to its declaration. Though it should be a superset of the declaration (as in C#):
valac cl1.vala if1.vala
cl1.vala:3.3-3.20: error: Type and/or accessors of overriding property `NS1.Cl1.str1' do not match overridden property `NS1.I1.str1'

2. Because of the point 1, one have to write such strange things as:
        public string str1 { get; private set; }
Though it doesn't work either (i.e. valac cl1.vala if2.vala ). I hope that the patch of Alexander Bokovoy will fix that (see that letter):
Subject:        Re: [Vala] interface properties: unexistent accessor
Date:   17.11.2008 13:08:20 GMT+6

====================

What do you think about changing this in Vala - to how it woks in C#:
1. Implementation is a superset of the declaration in interface.
2. Prohibit private accessors in interfaces.

I attach a small example.

Best regards, Ildar
--
Ildar  Mulyukov,  free SW designer/programmer
================================================
email: ildar users sourceforge net
home: http://tuganger.narod.ru/
ALT Linux Sisyphus
================================================

Attachment: cl1.vala
Description: Text Data

Attachment: if1.vala
Description: Text Data

Attachment: if2.vala
Description: Text Data



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