Re: [dev] [sbase] Use of libutil

From: FRIGN <dev_AT_frign.de>
Date: Wed, 29 Apr 2015 17:48:35 +0200

On Wed, 29 Apr 2015 08:58:26 -0300
Marc Collin <marc.collin7_AT_gmail.com> wrote:

Hey Marc,

> If anything the amount of extra space you're taking up in the symbol
> table with an additional (imported) function call and the code of the
> putword function, for example, absolutely trivially stupid function is
> far more than just integrating the bloody thing into the source. It is
> literally a compare with an existing variable and a conditional
> function call, which you can't do if you decide to pull it out
> separately so you have to make an extra fucking variable THAT IS ONLY
> EVER USED ONCE! Instead you have to go through the motions of passing
> parameters and register saving/restoring and all that stupid shit that
> compilers do when they call functions.

It is one thing when your ACU project is slammed on some message board
on the Interwebs, it's another when you start "criticizing" another
project on false grounds.
I'll give you a small hint: The symbol table does not matter too much
in statically linked applications (and that's what's supposed to happen)
and libutil is not dynamically linked into the binaries.
If the compiler detects a function to be "trivial", it will inline it
automatically. I can understand the motivation to do that manually to
optimize the code, but premature optimizations are the first step
towards broken and unmaintainable, chaotic code (look at ACU).

I'm glad to see you subscribed to the suckless ml, you still got a lot
to learn.

> Why don't you refactor all the for loops out into their own function
> too? Or all the if statements? After all, they are "duplicated code".
> This is near that level of retardedness.

Check out GNU coreutils if you like that.

> You've also not propagated errors correctly... so it is a FAIL!

Where?

Cheers

FRIGN

-- 
FRIGN <dev_AT_frign.de>
Received on Wed Apr 29 2015 - 17:48:35 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 29 2015 - 18:00:10 CEST