Re: [Vala] Math.exp2 not portable



I think the a 'Deprecated' tag must be too hard to use.

For this case a @deprecated in the comment, like doxygen, can be
sufficient for many people.

The message won't be visible for users but developers know that there
is a problem with this method and why.

/**
 * Bla Bla Bla
 * @param arg Arguments text.
 * @return Returns text
 *
 * @deprecated Why not use text
 */
int foo(int arg);

2008/1/31, pancake <pancake youterm com>:
On Wed, Jan 30, 2008 at 09:48:11PM +0100, J?rg Billeter wrote:
On Wed, 2008-01-23 at 11:10 +0100, pancake wrote:
But the reality is another:

 http://www.gnu.org/software/gnulib/manual/html_node/exp2.html

We don't guarantee that all functionality provided in Vala bindings is
available on all platforms. exp2 is a standard C function, I don't see
an issue in keeping it in the bindings, it's hardly an exotic function.

it's only a GNU standard. btw i'm thinking about the possibility to mark
some methods as deprecated with an associated explanatory string.

This would be nice to develop, so you can mark a method as deprecated, and
all the times you call it the compiler will show you the 'error message':

[Deprecated (reason="foo() method has been deprecated, please use bar()")]
public void foo() {
        ...
}


or something like that :) what do you think?

it has nothing to do with the exp2 problem, but maybe we should warn or alias
exp2(x) as pow(2,x) that performs the same operation...so a tip like that can
be added into the vapi as [Deprecated] or [Tip] or whatever else, to let this
decission relay on the developer.

--pancake
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list




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