Hi! El 24 de septiembre de 2009 20:39, Levi Bard < [email protected]> escribió:
> Hey, Kratos is my ferret!!!! :D The purpose of your original message was to introduce us to Kratos, wasn't it? :-P lol :) If he could read would say this: "DOK!" >> I am looking for a universal combination between language and libraries. >This is the great thing about using Vala for libraries: you don't NEED >to be able to compile Vala libraries to cli or java bytecode or pyo or >rubygems or ... All of these languages already support binding to >C libraries, and Vala's (default) use of GObject means that a lot of >these bindings can be generated near-automatically at a very low cost. > Write one library in Vala, call it from c#, ruby, everywhere! Yes but not. I am looking for a system than can allow a developer to compile, easily, for any platform or SO or device. You can force the precompiler to generate code for linux, or windows, or a PDA just by using libraries developed with the help of precompiler directives and precompiler code. You can get this new code and compile it in a common compiler of the target SO/device. Yes, there are multi-SO libraries out there (wxWidgets, glib, lua, gtk+, sdl, allegro, etc) but if you need to port an application to another SO, one which is not supported by one or more of the libraries, it is a mess and you need to change the library and maintain two branches of code. (And I forgot to say that maybe you must research which library to use, risk on developing over a incomplete or bugged one, needing to learn how it works, etc) My idea is to use "proxy libraries" so, the common developer sees "Thread.Sleep", but just below this visibility is a little layer which links the method to the real method of, (by example) pthreads for linux or to the common threads library of windows. This will be done with precompiler code and directives and will be done before by someone (or maybe you). There will be optimizations with help of macros (“macroizing”?), generation of code, help with aspect programming, etc. There could be a lot of possible libraries, or algorithms or options for the use/develop of a component. Tweaks enter here. Maybe you want to use a different DHT version; if it does not exists, you could add a “tweak” for the DHT so it could function in another way and then use it invoking the tweaked version. Yes, you can get this done using abstract classes and a lot of method calls between father class and its son, but it is contrary to maintability, it is a mess, and maybe you cannot afford the use of so many method calls. Why use a spoon when you can use a machinegun? Not only a class can be developed to be tweakeable. Methods could be also. How many times have you develop a method that is just only one line different from the one just below? How many times have you, for reusability, have created a method that uses local variables or parameters just to change its internal behavior? Yes, yes, a method call, a IF, etc, have no cost for your mega CPU, but it is not the same if you have millions of 'free' IF per second shared between your program, your SO, your libraries... When you use a method call to a library (from SO or not) could be thousands of unnecessary calls and lines of code working below. And: Less classes, less methods, a good GUI = faster learning curve and faster development.
_______________________________________________ Vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
