Re: The Lib debate
From: JohnFound (johnfound_at_evrocom.net)
Date: 02/09/04
- Next message: Woody: "Re: A sample RosAsm macro (actually a whole set)"
- Previous message: Betov: "Re: First RosAsm -app-"
- In reply to: Betov: "The Lib debate"
- Next in thread: Betov: "Re: The Lib debate"
- Reply: Betov: "Re: The Lib debate"
- Reply: Gerhard W. Gruber: "Re: The Lib debate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 Feb 2004 07:46:55 -0800
Hi all.
As far as my post in another forum caused this discussion, I want to
express my opinion about libraries and more generally about
code-reusing technics.
I will not repeat quoted by Betov, because the quote is exact and I
stay on every my opinion. But I think there is a need for some more
notes.
I am (and I think Betov too) not against code-reusing technics. IMHO
there is not real programmer that to write everything from scratch
every time. In generally code-reusing is most natural technic in
programming.
BUT, like everything in this world, code-reusing and libraries
particulary, have some very bad defects that may turn whole good idea
to the vicious practice.
Actually you can see everyday how this practice applied in the way it
is applyed in HLL programming leads to more and more overbloated
software with every new version: Compare Win95 with WinXP - IMHO there
is not so big amount of new features that to excuse so big difference
in size and speed of these OSes.
But OK, let say MS is evil and their programmers sux :) But what about
Linux? It was really fast and lite OS in the begining. Now it is
slower than Windows and have more bugs, especially in the GUI.
So, IMO, everything is as result of using wrong code-reusing approach.
The lowest level subroutine is simply a little-little slower. The next
level subroutine that call's the first one thousends times will be
more-slow, the next level more, etc, etc. But the programmer on 3-th
or let say 4-th level of nesting can't do nothing even if he is an
expert. Simply because he have no any idea what actually happen in
black box modules, written from another people with another measures
and for another use.
It will happen less often if the programmer use source-level
libraries. Because the main advantage of such libraries is not that
they are open source. The main advantage is that they can be adjusted
for every concrete case. At first this gives to programmer easy way to
take exactly what he needs with little or even no additional efford.
It is not rare case that the programmer get the library with functions
that approximately fits his needs, but not entirely. And he have to
redesign entire program, data structures, even to write conversion
routines, that to move tons of data from one array to another just to
fit in the requirements of the one only precompiled function. Is it a
overbloat?
I read many messages about how bad is that using source-level
libraries you can't use code written on other assembler. But this
statement is simply not true. We talk about assembly - you know the
syntax is almost equal to all assemblers. The effort to convert any
library from MASM to FASM syntax (for example) even manually is
nothing, compared with advantages. And this is only one-time effort
and then I can use this library for any of my projects and modify it
to fit exactly in every program I use it.
What about libraries written on other languages? Well, actually using
assembly routines in HLL programs have some sense, but who the hell,
will use HLL library in assembly programm, if he can refuse this???
The only case that using HLL libs is absolutely imperative is with OS
standard libraries (for example Windows system DLL's) Unfortunately
this using does not depend from the assembly programmer at all. It is
forced by OS. The only right approach in this case is simply to make
using of system functions as rare as possible. This approach will give
many advantages one of them is more fast and portable assembly code.
I know that most of visitors here write assembly only like addition to
C and C++ programs. (At least the pure assembly programs are less that
posters in this group. :D ) But now we are talking about approaches
and technics that are for fully assembler written applications. Don't
try to use the same standards as in C and C++, they simply does not
fit in proper assembly way of writing.
Regards.
John Found
- Next message: Woody: "Re: A sample RosAsm macro (actually a whole set)"
- Previous message: Betov: "Re: First RosAsm -app-"
- In reply to: Betov: "The Lib debate"
- Next in thread: Betov: "Re: The Lib debate"
- Reply: Betov: "Re: The Lib debate"
- Reply: Gerhard W. Gruber: "Re: The Lib debate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|