On Thu, 2009-12-10 at 12:07 +1000, Magentus wrote:
> On Wed, 09 Dec 2009 16:04:42 -0500, 
> Jamie McCracken <[email protected]> wrote:
> 
> > On Wed, 2009-12-09 at 20:50 +0100, Nicolas wrote:
> >> In fact, i'm using genie, because i love the syntax.
> >> I making all the available examples in 
> >> http://code.valaide.org/category/tags/genie
> >> But the problem i encountering here, i can encounter it with other 
> >> languages, because i don't know about the programming techniques.
> > In Genie we automatically determine the hash function to use based on
> > type (unlike vala which has to specify the hash function)
> 
> I haven't really looked at genie...  But I'm curious, where these
> differences come in, what exactly is genie's relationship to vala?  I'd
> sort of assumed it was just an alternative source file parser with the
> same compiler back-end.

it is only at the parser level that it is different. We simply add in
the default string hash if the parsed key is a string, or int hash if
int or direct address for everything else. Of course the user can still
override these defaults and provide hash functions themselves (EG if you
wanted to make the string hash function case insensitive) but for most
cases the defaults are fine so Genie avoids the extra tedious coding
that you currently have to do in vala when you dont require custom
hashes

> 
> For example, why can genie figure out the correct hash function in some
> cases, but vala can't?
> 

Philosophy perhaps? Genie is more concise and makes more default
decisions for you making coding easier, cleaner and less hassle. There
is no technical reason why vala could not do the same here. 

jamie


_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to