language choice of alfs

Hui Zhou zhouhui at wam.umd.edu
Sun Dec 19 07:25:57 PST 2004


On Sun, Dec 19, 2004 at 08:39:02AM -0500, Jeremy Huntwork wrote:
>Hui Zhou wrote:
>
>>IMHO, C is the worst choice for the job. ATM, I recommend python.  
>
>Hui,
>
>Sorry, but this isn't the way to go about it. If you want people to take 
>your suggestions seriously, you're going to *have* to give us a reason, 
>or even better, reasons for your preference.  We're not going to change 
>our mind simply because you tell us to.
>
>--
>Jeremy Huntwork
>

It is fine you guys don't take my opinion seriously. I didn't expect 
so. And I am not suggesting, just throw in a choice into the pool so
 some developers may look at the decision one more time. The final 
reason will be the availibility of developer and their programming 
experiences, not the suitability of languages.

The main reason not to use C is because C is too low level as a 
language. To achieve a same function in C compared to implementing in a 
higher level language, the c coder need struggle with the language 
itself for significant protion of time. Disregard the effort needed, C 
can offer the best performance maybe next to assembly, no question. 
But I don't see the speed is of any concern to the alfs project. The 
security risks, maintainence cost and development effectiveness weighs 
much more. As to the libraries, simple code within the library scope 
can be very neat to both codeing and reading, but there is not much 
creativity in it, is there. As soon as functions beyond the library 
are added in, the program quick grow into some awful look. A typical 
development with C is to start from scratch rather than to reuse the 
code. C, and C++ codes are not really useable when it reaches a 
certain size unless they are wrapped into some sort of black box which 
requires a lot more effort and seals in a lot of risks and bloats.

C++ is better than C for experienced programmar who knows which 
features to use and which to avoid in the aspect of lowering the 
maintainence cost and maybe coding effectiveness, it shares all the 
vulnerbility with C and even more. The grammar of C++ is a nightmare. 

Both C and C++ uses the terrible preprocessing mechanism. The human 
mind only works at 5 +/- 2. With multiple #ifdef's, even a very simple 
program can be impossible to read. Try to read the code of less -- 
it's just a pager for god's sake.

Java is much better, C# is even better. However, both also contained a 
lot of enterprise hypes, one of the reason many programmer especially 
in the open source community still choose C over them(due to distaste 
not reason). Another reason is the large or dominant code base in the 
unix world. 

Functional programming languages are potentially better as shown by 
many academic publications. However it requires a much different mind 
to effectively both use and read or maintain. I was trained from 
pascal and C, and definitely lack the suitable mind to even dare to 
comment. Why lisp existed so long but still has such limited code 
base?

Perl and Python and other scripting language lacks the perfomance as 
they lay heavey load on the runtime. I generally against the policy to 
sacrifice runtime to gain development time. If the program will be run 
by 1 milion user, the balance is usertime * 1 milion against a few 
developer's time, the user wins most of the time. However, alfs is not 
targeted for large user base, so ease of development should be the 
major base. Scripting languages are designed as glue code which is 
right in the alley of alfs.

Bash script doesn't qualify as a programming language really, almost 
all the programming language concepts are against it except for some 
very short ones.

Perl is my language choice for POC, but beyond that, it sucks majorly 
due to lacking structural features.

So I recommend python, same with ruby.

Arguing which language is better often quickly become very ugly as the 
opinion is largely experience based. So I am not tring to argue in any 
way. Just to throw in my opinion to open the choices a little wider. 
Whether or not you guys consider it or treat it as nonsense doesn't really 
matter.

Regards,

-- 
Hui Zhou



More information about the alfs-discuss mailing list