Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

single-call link # function calls?

Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
04-02-2006 10:07
From: Eep Quirk
A new function is unnecessary.
In other languages that would possibly be true. LSL is an "early binding" language. Type information is handled entirely by the compiler, there are no run-time type checks. For a simple compiler (and LSL is a compiler that's simple to the point of being simplistic) this is the most efficient kind of language to implement.
From: someone
LSL's current functions simply need to be written better to allow more versatility.
There is no way for LSL's functions to know the type of an argument, so there's no way to change that without making LSL a dynamically typed / late bound language, which would make LSL significantly slower.

Eep, I wrote my first compiler in the late '70s. I've been doing this stuff for a living since before the earliest ancestors of the "cyberspace" that Second Life represents even existed. If there were a practical and efficient way of producing the kind of overloading you want without significantly complicating LSL, I'd know about it. There isn't, honestly.
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
04-02-2006 10:11
What about Mono supposedly speeding up LSL? LSL should be rewritten TO support argument type knowledge then.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
04-02-2006 13:07
From: Argent Stonecutter
(and LSL is a compiler that's simple to the point of being simplistic)


Least its not brainf*ck. Think i might kill myself if thats all LSL bytecode supported.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Resuna Oddfellow
Registered User
Join date: 19 Sep 2005
Posts: 13
04-02-2006 15:04
From: Eep Quirk
What about Mono supposedly speeding up LSL? LSL should be rewritten TO support argument type knowledge then.
No.

Complexity is inherently bad. Complexity breeds bugs. LSL's simplicity is a good thing, if occasionally frustrating.

Mono's big advantage here is twofold: first, that "too slow" loop will be sped up to the point where you won't care; and second, it'll eventually let you use other languages than LSL, which will support whatever fancy object-oriented features you want. Using Mono then slowing LSL down again just because it's faster now is not just going to produce the opposite effect than the one you're looking for, it'll be wasted effort.
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
04-02-2006 16:26
From: Eep Quirk
Too slow; see above.
so why don't you just use a for loop? that's what I do to change some linked prims' colors. I iterate through a list.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
04-02-2006 21:00
From: Eep Quirk
What about Mono supposedly speeding up LSL? LSL should be rewritten TO support argument type knowledge then.
Why not take advantage of the faster speed to make your loop faster, instead of making everyone's code a little slower than it cood be... to hide the loop that it'd be running anyway!
1 2