How "old-school" are we talking? Like K&R-C style or what?
The core framework for ICQ was actually written by AOL long before ICQ was born. I.e. they developed general framework for scalable distributed systems.
So some comments in the code are dated as early as 1992.
I didn't mean formatting style but general flavor of how programs was written at these days. I can't put it into words, it's better to just see the code. Although, I'm not permitted to show the code.
Also, this code is part of AOL internal framework which is not directly connected to ICQ.
But, hum hum, What is considered non-old-school really modern C? Are there any new non-trivial C programs or systems anymore?
I look at the Linux kernel and some drivers occasionally, and possibly do some changes in some drivers and tools related to DVB and media, but I never look at "new" C code.
Hiding the struct like:
typedef struct foo_t foo_t;
/* ... */
foo_t *foo_new();
kinda forces heap allocs. There are times when you want to allocate on the stack, and not use alloca.Most of the time, I still keep struct definitions in header files, but API wise I always write functions or macros for anything that touches them and discourage direct access to struct members. Depending on the use case of course. Abstract types have their uses too.
Mind expanding a little bit why is that?
In early days, native TCP/IP stacks wasn't good at handling so many simultaneous connections as ICQ needed to handle.
So AOL just wrote their own TCP/IP stack (I think they used this implementation not only in ICQ).
In modern days, it's legacy.
I think they already removed this stack since I left company.
I started to work at Mail.Ru in 2010, when Mail.Ru bought ICQ from AOL.
I was enjoyed working with ICQ backend code-base written by AOL (although to be honest not all code was high quality).
Here are some quick facts about ICQ backend infrastructure:
1) ICQ servers has over 2'700'000 lines of code which is written in C and C++;
2) ICQ has its own TCP/IP implementation which works in the user space;
3) Concurrency based on event-driven model (epoll), each instance handles many requests semi-simultaneously;
4) About 60 different interconnected internal services;
5) Each kind of backend service is a cluster of more than a hundred of instances;
6) C core-code is written in old-school style and I liked that;
7) OSCAR protocol is defined in TCL files. Our custom build system created C-functions which pack/unpack OSCAR messages;
8) Huge portion of core code-base was dedicated to create very scalable distributed server architecture;
Note that all publicly available information in the Internet about ICQ protocol describing legacy binary protocol called OSCAR. Native modern mobile client uses HTTP based protocol which supports recently added features.
According to Mail.Ru Group audited annual report, in December 2013 ICQ had 11 million monthly active users.
P.S. I would prefer not to discuss marketing/business side of ICQ because I personally had fundamentally different opinion from AOL/Mail.Ru product owners. I was quite happy with plain minimalist Pidgin ICQ client. Also, I'm not aware of new features this guy describing. Many things in code-base may be changed since I left the company.