Thread: C Language And A Scripting Language

  1. #1
    DarkSpy
    Guest

    C Language And A Scripting Language

    Which is the best scripting language to go along with C? Which one combines better with C?

    Thanks.

  2. #2
    .........
    Join Date
    Nov 2002
    Posts
    303
    I only know very little python but it would be something that I would look at if I was learning two things at once because it is so simple. C will take alot more effort to master than python will, and python being so easy will make it a good choice I think. Alo of people say that python should be the first programming language learned because the syntax is so simple. Whether they make a good combo or not I dunno, personally I'm sticking to C till I'm better at it.
    Check out
    www.python.org
    Last edited by SourceCode; 06-24-2003 at 04:00 PM.

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    19
    Python is an easy langauge to learn, and combines well with C. You can use python for most tasks, and if something can't be done in Python or if it is too slow, you can write that part only in C and import it into Python as a module. So my choice would be Python.

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    351
    Perl is sometimes described as the 'glue'. Fits well with C, especially on Linux. Like PHP, It's syntax can be C-like or script-like.

  5. #5
    Registered User
    Join Date
    Oct 2002
    Posts
    385
    Python is a very easy language to learn and is capable of being used for short scripts or massive applications. It has modules for just about anything and everything out there and as it was stated earlier, is capable of using modules written in C for anything that needs to be lightning quick.
    Wandering aimlessly through C.....

    http://dbrink.phpwebhosting.com

  6. #6
    Registered User
    Join Date
    Jun 2003
    Posts
    3
    which scripting language you use is likely
    a question of your personal taste more than
    anything else.

    if you are planning to use a scripting language to front
    your underlying C code then you might want to
    consider using SWIG (http://www.swig.org/) which
    will take care of interfacing issues for you.

    SWIG works nicely with Perl, Python and Tcl (as well
    as some others ;-).

    A.

  7. #7
    DarkSpy
    Guest
    What about Tcl and Ruby?
    Since Python is OO, will a language like C combine better with it?
    Anyone used CLS?

    Thanks.

  8. #8
    Registered User
    Join Date
    Jun 2003
    Posts
    3
    SWIG co-operates with Tcl and Ruby though I
    have to say I've not used it with these languages

    I guess it all depends on what you mean by
    "combine" with C - the way I see it I use C to
    write the core functionality I require and then use
    a scripting language (e.g. generated Perl module) to
    apply the interface in my (Perl) code.

    The design of C means that it can present a modular
    interface but not necessarily an OO one. You can
    to a certain extent achieve the latter but this might
    not always be what you want to do.

    Some languages, e.g. PHP, are largely built from
    underlying C interfaces but still accommodate an OO
    style elsewhere. The two are not mutally exclusive.

    Hope this helps,
    A.

  9. #9
    Registered User
    Join Date
    Jan 2003
    Posts
    648
    I've used CSL before in a small project. I would recommend it. Nice, simple, fast, easy to incorporate, straight forward API.

    However, if you can get JavaScript going in Windows, that would be easier to use and you have more control. You would have to use COM though (i think). I've only used JavaScript from VB6 ( ) and using the Windows Script Host Control.
    Last edited by Speedy5; 06-26-2003 at 08:27 AM.

  10. #10
    DarkSpy
    Guest
    I don't use Windows.
    Anyone used Lua?

    Thanks.

Popular pages Recent additions subscribe to a feed