[Y-devel] Phil meet y-devel; y-devel meet Phil

Ulrik Mikaelsson rawler at rsn.bth.se
Tue Jul 20 08:03:36 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Monday 19 July 2004 23.33 skrev phil at www.y-windows.org:
> Just to state my viewpoint on this -- we're going to have to write the core
> library in C.  Nothing else has the platform coverage, or interoperability
> with other languages.  At the end of the day, if I can't port the library
> to every platform I've used in the last year (off the top of my head that's
> z/OS, AIX, Solaris, HP-UX, OS/400, Windows XP/2k/2k3, about 9 variants of
> Linux for intel, 3 Linuces for PowerPC, 2 for zSeries, and MacOS X) without
> needing to rewrite huge tranches of it, then there's something wrong with
> the design.
Sure, there should definitely be support for C in Y. One of the main 
arguments, as I see it is that C is somewhat the smallest denominator for all 
languages. All languages can bind to C-api:s, or create C-compatible API:s of 
their own. However, I would just like to put up a finger of warning: whilst 
we SHOULD have a C-API, binding to the C-API is not necessarily the best 
option for other API:s. I have written a C#-binding for current Y, for 
instance, and after binding to the C-API for a while, I threw that idea out 
and implemented the protocol directly in native C# instead. IMHO that gave me 
much cleaner code, more obvious code, code that's consistent all the way out, 
and I think a somewhat better performance, since I did not have to transform 
message structs back and forth all the time, to compensate for the 
programming differences in C# and C.

> The server is a different kettle of fish, it has far less need to be
> immediately portable.  But even so, this is low-level code -- we need a
> language with fine-grained control over what's going on.  Again that
> implies C.
Indeed. The server should certainly be C, for performance and control.

> Also, I like writing C.  It's a simple language -- programming well is hard
> enough without things like operator overloading ganging up on you...
Well, I'm glad you like it. Personally I have no preference between C, C++, C# 
or Ruby. They all work fine for different things IMHO. (Still have to try out 
Obj-C, though). I'm especially happy that you like C, since the server is 
especially important to have written in C. So you should be well-suited for 
the job. ;)

Regards
/ Ulrik

- -- 
Worlds are conquered, galaxies destroyed -- but a woman is always a woman.
                -- Kirk, "The Conscience of the King", stardate 2818.9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA/MPO069SELtZwIkRAueDAJ9dOw1cfKSjaKzcgDO7ZIfpSTHYCACfaxPX
yepQx/g7yHqQDvFGq7JAVFs=
=q7Sg
-----END PGP SIGNATURE-----



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved