8 Nov 2003 sisob   » (Master)

Programming Languages

I know that "every progamming language sucks, each in it's own special way". But I have to say that since I've been learning about object orientation in java it's struck me how UGLY object orientation is in C. Appart from anything else C/Gtk+ is just really hard to read, which to me is a signifigant barrier to entry to hacking.

I was delighted recently to discover how similar C# is to Java. I mean check out gtk#'s hello world, it's just sexy:

	using Gtk;
	using GtkSharp;
	using System;

	class Hello {

		static void Main()
			Application.Init ();

    			Button btn = new Button ("Hello World");
    			btn.Clicked += new EventHandler (hello);

			Window window = new Window ("helloworld");
			window.DeleteEvent += new DeleteEventHandler (delete_event);
			window.Add (btn);
			window.ShowAll ();

			Application.Run ();

		static void delete_event (object obj, DeleteEventArgs args)
			    Application.Quit ();

		static void hello (object obj, EventArgs args)
			Console.WriteLine("Hello World");
			Application.Quit ();

That was taken from the mono handbook. There are some hideous C/Gtk+ hello worlds online too. I always knew I hated trying to hack C/Gtk+, but now I know that there is something better.

I should be a pretty decent Java coder by the end of this (college) year, maybe I'll pickup some C# coding this summer if I'm not working. F-Spot looks very promising and would be great if combined with Original for web publishing, and a Gnome scanning program.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!