Re: [Vala] bugs



That's obviously a bug in valac, however it's safe to ignore for now;
it's more a cosmetic problem than anything else. We'll fix it as soon as
we have proper flow analysis in place.

Ok! Some of these tips are "fixed" by gcc with -O's but it's better not to
add noisy code by default.

BTW I have noticed the -O flag in valac, that it's just the same as passing
it to gcc. The problem I see here is that you're forced to place a space
between the flag and the argument. Hardcoding some flags like -O0 -O1 -O3 ..
would be more closer to gcc.

Talking about design patterns. This is a bad idea because you are dupping
LOCs without needing to. There the -X flag to directly pass flags to gcc,
so -O is not necessary there. So you can:

 $ valac -o foo foo.vala -X -O3

which is the same as:

 $ valac -o foo foo.vala -O 3

For me the first way looks cleaner and more orthogonal :)

The same can be applied to the -g flag

The only way I can understand the existence of these flags is to keep operation
consistence between different compilers (gcc, tcc, msvc, ...) wrapping these
flags to the correct syntax for the target compiler.

BTW the best way to do this (imho) is to create another program that acts
as a meta-compiler wrapper for gcc/icc/.. and make valac call the meta-compiler
and the meta-compiler call the desired compiler with the right flags and environment
variables.

NOTE: I have created an account on the wiki and fixed the signal example.

Thanks for fixing the example. Vala SVN now reports an error when trying
to define a signal in a type not deriving from GLib.Object.

Ok, that's better :)

A little question... is there any way to browse namespaces classes and methods?
a cmdline tool to query this will be nice for an IDE (or vim ;) integration for
method autocompletion and so.

I have tested the use of 'class Maman.Foo' vs 'namespace Maman; class Foo' and looks like
the C generated code is exactly the same. So I understand that both codes are equivalent.

Maybe that's new to me, because I'm a c# ignorant O:)

The implicit namespaces are not supported in C#, that's a Vala feature.

Yay :) That's nice.

Thanks!


  --pancake



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