News for hackers. Stuff that matters.
Re:ICQ: 20 Years Is No Limit by AdmiralAsshat on Tuesday November 15, 2016 @05:20PM (#12962835)
>6) C core-code is written in old-school style and I liked that;

How "old-school" are we talking? Like K&R-C style or what?

Re:ICQ: 20 Years Is No Limit by hal9000xp on Wednesday November 16, 2016 @04:27AM (#12965575)
I forgot to mention an important fact about ICQ core code-base.

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.

Re:ICQ: 20 Years Is No Limit by ido on Wednesday November 16, 2016 @06:51AM (#12966203)
Why do you assume it was written by AOL and not Mirabilis?
Re:ICQ: 20 Years Is No Limit by hal9000xp on Wednesday November 16, 2016 @07:39AM (#12966416)
As far as I know AOL entirely rewrote ICQ code-base.

Also, this code is part of AOL internal framework which is not directly connected to ICQ.

Re:ICQ: 20 Years Is No Limit by kpil on Tuesday November 15, 2016 @06:46PM (#12963378)
K&R C must surely be too old. It was starting to be old in the early 90s, and I think Linux and GNU where quite progressive in the days.

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.

Re:ICQ: 20 Years Is No Limit by _wmd on Tuesday November 15, 2016 @09:52PM (#12964161)
Around the turn of the century people stopped going crazy with macros, globals and exposing struct definitions in header files, at least this is where I draw the line between old and new school
Re:ICQ: 20 Years Is No Limit by sebcat on Wednesday November 16, 2016 @12:48AM (#12964823)
> exposing struct definitions in header files

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.

Re:ICQ: 20 Years Is No Limit by asmdev on Wednesday November 16, 2016 @12:40AM (#12964791)
I expose struck definitions in header files too. What is a better or alternative way to do it?