This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bad news from the module/environment front


Telford Tendys wrote:

> If you are saying that we should have a long term objective to
> unseat C and become the only language anyone will ever need -- 
> you have got to be joking. Guile MIGHT have a slim chance at 
> unseating perl, unlikely but possible, planning the scheme 
> takeover of the known computing universe is a little premature 
> at this stage.

Premature? Sure. A joke? I think not.

> I often write a first draft in scheme and a third
> or fourth draft in C -- no big deal, usually the C rewrite is 
> very fast because by then I know WHAT it is I'm supposed to be 
> writing.

While writing the 4th draft in C may be relatively quick, it's still a
plain 'ol waste of time.

> I'll agree that a scheme compiler would be nice at times but 
> hardly an essential thing. 

You're wasting your time re-writing your code in C, then you say that a
compiler isn't important because efficiency doesn't matter. What's wrong
with this picture?

> so I think the pragmatists amongst us will admit that C 
> compilers will beat scheme compilers for the foreseeable 
> future. Yes, I know people have quoted good results for stalin 
> but those are a few special cases and a long way away from 
> being applicable to the day-to-day needs of most coders.

For goodness sake, most coders are using that hog-slow thing called Java
to solve almost every conceivable computer science problem known to man,
but you don't think well compiled and optimised Scheme can solve the
"day-to-day needs of most coders"? What's wrong with this picture?
 
> Oh this is just silly. Like I said, rewriting a few critical 
> crunching routines in C is no trouble when you can bolt-in C 
> code and call it from your scripting language. 

Are you the same person who stated above that they re-write their whole
application in C for performance?

> People still write in assembler for crying in a bucket, they 
> don't write whole apps, they just write the routines that
> really matter. 

In 10 years in the commercial computer industry, I've yet to see anybody
write a single line of assembler.

> I can't say that I have much experience with Tcl but I know 
> that there are still people using it. Your reasoning is that 
> every application must be homogeneously coded and switching 
> language means restarting from the ground up. This is contrary 
> to everything that guile stands for.

True, but having to re-write in C is a waste of time, annoying and a
maintenance problem.

> Actually, C can afford to generate garbage without wasting time 
> because it uses stack storage for auto variables and the stack 
> frame is reset on return. Also, because the compiler does data 
> optimisation, you can define a dozen temporary variables for 
> this and that but the only space used is what needs to be used. 

Ahh yes, compiler optimisation. If as much effort had been put into
scheme compilers as has been put into C++ compilers I reckon Scheme
would be comparable in speed.

> Often people use temporary variables just to give a meaningful
> name to a sub-expression or to change a type. Doing this in C 
> cost NOTHING in terms of final code efficiency -- it will 
> generate identical code.  Doing this in scheme is guaranteed to 
> generate garbage and waste time.

Guaranteed? Have you forgotten compiler optimisations?

> Same with numbers, C does its type-checks at compile time and 
> sets the operation in stone, scheme checks at run-time and 
> changes the type of the number when it sees fit, scheme will 
> always be slower. 

Scheme need not always be slower. In many cases Scheme can be just as
fast if your compiler is good enough.

> Same with checking how many args there are for a function. In 
> short, an interpretive language has a ``performance roof'' -- 
> you might as well deal with it.

BS. BTW, where did you get the absurd notion that Scheme is an
"interpretive language"? Scheme can be compiled or interpreted. C can be
compiled or interpreted.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]