SHARE
Facebook X Pinterest WhatsApp

IBM developerWorks: GNOMEnclature: Getting Ready for GNOME 2, Part 2

Written By
thumbnail
Web Webster
Web Webster
Jun 14, 2002

“In this article, we’re going to take a look at the GLib object
system, also called ‘GObject’, which up until recently used to be
part of GTK+. But before taking a look at the new object system in
Glib 2.0, we need to address a more fundamental issue — what
exactly is an “object system” and why does it exist? After all,
isn’t C a non-object oriented language? It is possible to write
object-oriented programs in C, or must one use C++ instead?

“The answer is that it is possible to write object-oriented
programs in C. However, because the concept of object isn’t a part
of the C language specification, an external library is required to
provide this support. In this article, we use the term ‘object
system’ to describe a library that provides the foundation required
for OOP programming, and Glib is an example of such a library. Glib
provides a C implementation of classes, inheritance, reference
counting, signals, interfaces, and object properties. By using
Glib, C programmers can write object-oriented programs with
ease.

“So, it is possible to write object-oriented programs in C.
However, you may be wondering why the GTK+ developers didn’t just
go ahead and use C++ instead. Without covering every possible
explanation, here are a few reasons why it makes sense to have an
object system for C. For one, there are many developers who simply
prefer C to C++. In other situations, using a C++ compiler may not
be an option due to project or platform constraints. Whatever the
reason, having an object system for C opens up OOP programming (and
GNOME programming in particular) to a wider number of potential
developers, and for that we’re grateful…”

Complete
Story

thumbnail
Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Recommended for you...

5 Best Free and Open Source Text Expander Tools
webmaster
Jun 13, 2025
Grafito: Systemd Journal Log Viewer with a Beautiful Web UI
Bobby Borisov
Jun 12, 2025
FreeBSD Wants to Know a Few Things
brideoflinux
May 11, 2025
NVK enabled for Maxwell, Pascal, and Volta GPUs
Kara Bembridge
May 1, 2025
Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.