Implementing scripts in C - page 3 - Feature Requests - CHDK Forum

Implementing scripts in C

  • 24 Replies
  • 11057 Views
*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Implementing scripts in C
« Reply #20 on: 24 / July / 2008, 07:27:27 »
Advertisements
wow - an interesting discussion about "the right" alley...hey, we are talking about scripts, not religion  :haha

We should keep the current uBasic implementation AND we should extend LUA to the powerful scripting tool we (i & some others) want to have !

...Standard Scripting --> uBasic  |  Power Scripting --> LUA  ==> we are all happy !

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Implementing scripts in C
« Reply #21 on: 24 / July / 2008, 07:32:56 »
I agree, and anyone re-reading the thread will find out that I wasn't discussing the merits of any language, but merely the merits (or lack of) of using GOTO's over structured loops. Last time I checked, uBASIC offered both.

*

Offline Velo

  • *
  • 30
Re: Implementing scripts in C
« Reply #22 on: 24 / July / 2008, 12:41:55 »
I doubt anyone but a few esoteric programmers know LUA.

Strong statement, but ...

Lua is in the Top 20 of "TIOBE Programming Community Index"
TIOBE Software: The Coding Standards Company

Lua has a very similar syntax to JavaScript. And I think much more people know JavaScript than Basic.

Lua is used in a wide varity of applications:
Lua: user projects

Not that I want to be a missionary, but you can't ignore the facts.


*

Offline RaduP

  • *****
  • 926
Re: Implementing scripts in C
« Reply #23 on: 27 / July / 2008, 10:22:28 »
I am sure LUA is good (personally I don't like either LUA or Basic), and many people would enjoy it being added in a default version.
But some things are so widely used (md, intervalometer, USB remote) that they should be written in C and be present natively. Those with some special needs can still use LUA/Basic.

*

Offline reyalp

  • ******
  • 14125
Re: Implementing scripts in C
« Reply #24 on: 27 / July / 2008, 16:32:12 »
But some things are so widely used (md, intervalometer, USB remote) that they should be written in C and be present natively. Those with some special needs can still use LUA/Basic.
I completely agree those features should be standard and easy to use. That sounds to me like what you are actually asking for, and that's a matter of user interface, not what language they are implemented in.

With something like lua, you could make scripted stuff mingle seamlessly with the rest of the interface. From a development prospective, this has some attraction because it gives you modularity, a relatively easy path from user contributed script to official feature, and easy prototyping. On the down side, some things are less efficient. Loadable native binaries gives you similar functionality, but with a different set of pros and cons. IMO, both will eventually have their place.

If you are going to keep putting in every useful feature, modularity of some kind is going to be needed.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal