


C Styled Script - C-like Scripting Language 211
Exomorph writes: " C Styled Scripting (CSS) has just been released for Linux! (Already available for Windows, and OS/2) You can use CSS like an interpreter (Like Perl) or as a scripting engine within your own applications. It follows the C syntax very closely and has now been released under the GNU General Public License." Is anyone using this?
several of those already exist (Score:1)
In practice, I have not found that style of programming to be very useful with C/C++: plain C/C++ just lack the kinds of facilities that make interpreters really useful.
Re:How? And what's the point? (Score:1)
slashdot now blatantly a corporate toady (Score:1)
your .sig (Score:1)
For CHRIST'S SAKE, give the man who said that the credits he deserves! You can't just dash around famous quotes without attributing them to someone. If you actually don't know who said it (you could also be downright evil and try to make people believe you came up with that yourself, for all I know), do a fucking google search!
I've heard rumours of something like this... (Score:1)
ACLiC, CINT and ROOT (Score:1)
This is (almost) what is done in ROOT (root.cern.ch). Instead of #including the system compiler's source they have something which is called ACLiC. With ACLiC you can compile some C/C++ code to a shared object (.so) using your systems compiler via a fork/exec and link it in to the running code. This is done with a single simple command.
Using the same command, minus an option, one can instead just interpret the code with CINT. This lets you trade off run time speed with compile time delay.
CINT: C/C++ interpreter (Score:1)
I agree that C/C++ is not the best choice for a scripting language in general, but it does allow one to prototype fast.
Re:Also not practical. (Score:1)
http://www.softintegration.com/ [softintegration.com]
Re:What we really need ... (Score:1)
Rule #1 of making things easy - you're making it easy for everyone, including the "bad guys". Keep that in mind.
_____
Sam: "That was needlessly cryptic."
Re:your .sig (Score:1)
#!/usr/bin/css (Score:1)
fails to expose the expected unixizm.
And
though. And GPL'd. Won't be long
before the warts are cured.
CSS doesn't look too hot from a quick glance (Score:1)
It only has one variable type (no ints/chars/whatever)... Seems like its missing all the bitops as well. Strange, off the wall language that will probably not be used much. If I wanted something for a quick script I'd use perl or shell script or even php instead of this.
Re:Got PHP? (Score:1)
Try html_errors 0 [php.net]
Enjoy!
Re:How? And what's the point? (Score:1)
You say that like it's a bad thing.
`just-in-time' compilation? (Score:1)
Certainly--Common Lisp has been able to do this for more than a decade. See page 677 in `Common Lisp: the Language', second edition, by Steele.
Re:Nice troll (Score:1)
(jfb)
Re:Moderation??? (Score:1)
time. User defines what the code does in some
built in shell, compiler generates code behind
the scene, dumps it to DSP then executes. For
my purposes compile delay is not important.
I guess I see no firm line between a scripting
shell and an IDE.
Re:C interpreters (Score:1)
Hrm. I found this particularly useful when doing AI stuff in Lisp. I'm surprised no one has done it for C yet, it would be a lot handier than having to recompile/start the debugger any time I get a "show-stopper" error. It would be nice to have known it as I was typing it, with nice messages like "you have over-shot your array boundaries again, dumbass. Please stop coding at 4am".
Re:How is this different..... (Score:1)
That is an important difference! :)
On a visible but distant shore, a new image of man;
Re:How is this different..... (Score:1)
Yeah, I actually use Pike, but I've never actually written anything in C, so I wasn't sure how close they really are.
On a visible but distant shore, a new image of man;
How is this different..... (Score:1)
How is this different from EiC [pobox.com]? Is it supposed to be better in some way?
On a visible but distant shore, a new image of man;
Re:Do it the right way (Score:1)
gcc scriptin' (Score:1)
If you want something like this:
#!/usr/bin/ccscript
* My C program here...
*/
and you don't mind terrible performance, then
you can just write a shell script "interpreter"
which simply runs gcc on your program.
#!/bin/sh
# ccscript:
tmpdir=/tmp/tmpdir.$$
rm -rf -- "$tmpdir"
mkdir "$tmpdir" || exit 1
tmpobj=${tmpdir}/obj
tmpsrc=${tmpdir}/src.c
tail +2 "$1" > "$tmpsrc"
cc -o "$tmpobj" "$tmpsrc"
$tmpobj
exitval=$?
rm -rf -- $tmpdir
exit $exitval
I expect that this CSS program would run a lot
faster, though.
- Kevin
It has to end in P (Score:2)
Hmm... (Score:2)
Ways not to have an impact on computing... (Score:2)
1) Define a new project with the same goal as multiple established projects.
2) Select a name that is already accepted for several other technologies.
3) Post it to Slashdot.
Lenny
no naming confusion here (Score:2)
Re:C interpreters (Score:2)
As for C-like embedded scripting, ECMAScript is darn close (some java-like things such as some OO support, and every object has toString()), and Mozilla has embeddable interpretors of their Javascript implementation for both C and Java. I prefer ECMA/JavaScript 'cause of its OO. Its not secure encapsulation (e.g., "information-hiding"), but it at least gives me encapsualtion.
Mind you, I'm still in the reading-stages of learning [PJ]ython, 'cause I haven't had the time to really write something yet.
--
You know, you gotta get up real early if you want to get outta bed... (Groucho Marx)
Why do we need another (scripting) language? (Score:2)
Personally, I love C, and I think any language that doesn't give you pointers and low-level control with the accompanying ability to shoot yourself in the foot if you don't pay attention is an underpowered piece of crap. That is, however, just my personal opinion based on my own history and needs, and I don't expect everyone else to adopt it. I certainly don't go running around every time a new language comes out asking, "Why do we need a new language? We've already got C!"
Conformity is a wretched mental habit. It may have its uses in a business environment, but I'd think the Slashdot crowd, if no one else, would be clued into the fact that some people program for pleasure, too. You'd also think that programmers would have a better understanding of the pleasure that comes from successfully doing something difficult.
--
CSS bashers totally miss the point (Score:2)
Re:Turing equivalence? (Score:2)
#warning this program considered harmful
#ifndef foo
#define foo 0
int main (void) { return 0; }
#endif
#if (foo == 0)
#undef foo
#define foo 1
#include "foo.c"
#elif (foo == 1)
#undef foo
#define foo 2
#include "foo.c"
#elif (foo == 2)
#undef foo
#define foo 3
#include "foo.c"
#endif
--
Re:Turing equivalence? (Score:2)
It's possible to do iteration with the C preprocessor. One example of it is http://www.ioccc.org/years-spoiler.html#1995_vansc hnitz [ioccc.org]
It is basically a file that #includes itself. Don't know if it's Turing complete though.
Preferred languages (Score:2)
Code spends 90% of its time in the same 10% of code. So this technique actually winds up working pretty well.
Register keyword... (Score:2)
Or like GNU's scripting-lang-in-programs, GUILE? (Score:2)
The only thing I don't particularly care for about GUILE is that it's a bit LISPish... still.
Re:Not to nitpick... (Score:2)
------
Re:How? And what's the point? (Score:2)
------
Re:How? And what's the point? (Score:2)
------
Turing equivalence? (Score:2)
Huh??? The pre-processor has no concept of iteration. I.e., you can't loop. Please provide some proof, or cite some reference, which shows that the C++ preprocessor (just C++? is the C preprocessor substantially deficient relative to C++?) is equivalent to a Turing machine.
Re:Nice troll (Score:2)
Yes, but in a well-designed language, "a=b" and "a==b" wouldn't both be completely legal and yet have completely different meanings.
Re:your .sig (Score:2)
Specific quote ref is here [bartleby.com].
Re:your .sig (Score:2)
Re:C doesn't make a good script lang. (Score:2)
Gee, it's a good thing PHP [php.net] doesn't look at all like C [php.net], or have stdlib like [php.net] fuctions, eh?
--
Re:Not to nitpick... (Score:2)
I love acronym abuse and polution! I would have thought intelligent people could avoid such unexcusably stupid decisions.
Don't need any more interpreted languages (Score:2)
Your assignment for next week is to try to convince your boss to rewrite the entire project in Intercal.
Re:How is this different..... (Score:2)
Well, the CSS site can handle the slashdot effect. The EIC site crumpled before this story had 50 comments.
Re:Not to nitpick... (Score:2)
Re:C doesn't make a good script lang. (Score:2)
You CAN use (more or less) exact C syntax in your perl scripts (all but the declaring, and libs part)... If you know C, you can move to Perl in the matter of 1-2 hours.
Re:Oh goody... (Score:2)
Let's move to unicode.
Use the tool for the job... (Score:2)
Re:What we really need ... (Score:2)
The key difference is that Gnus will display the code for the script and ask the user: "do you want to execute this script?". You don't see any Gnus mail virii, do you?
--
Re:C doesn't make a good script lang. (Score:2)
The things that seem to make Perl a great scripting language is that the syntax is moderately human readable (though it does have many symbols that can be confusing to newcomers). Also, Perl has great modules for CGI and text parsing, so that programmers don't have to reinvent the wheel. This makes many common CGI tasks a snap in Perl, while it may be more difficult in C (or a C scripting language).
CSS in artificial neural network software (Score:2)
-- DieZeugen
But why? (Score:2)
Re:EiC (Score:2)
1. Uses curly braces to delimit logical code blocks
2. Uses lowercase statements for control flow (if, while, for, switch)
3. The 'for' statement is not a proper looping or interation statement, but is just a "while++"
4. The 'switch' statement is horribly limited to compile time numeric constants and requires you to remember to 'break' after each case, which is braindead.
5. The language relies on libraries of functions to do anything useful (printf, scanf, getchar, fopen, etc, etc)
6. Ends logical lines with semicolons.
And that's about it. When you see "C-like", they tend to be talking more about form than function, to be honest. And they certainly NEVER mean any of C's ugly (but of course powerful) sides, like pointer arithmetic, massively complicated typed variable declarations on one line, a preprocessor that can easily obfuscate meaning from simply examining the code with human eyes, etc, etc.
Quite frankly, C got so far as it did because it was VERY fast, and very powerful if you knew how to weild it... and these things were very important when you had little memory and slow processors to work with. To be honest, the design goals of C make almost no sense any more. And C++ (a language I've worked heavily in for 8 years) is an abomination these days. So complicated it literally takes YEARS to become truely proficient, and designing and implementing huge systems in it is pure torture. Languages like Java and the like are here to take advantage of the ever increasing cheapness and availability of CPU and memory (and disk). They simplify life dramatically, speed development, get rid of complicated maintenance of separate header and code files, compile lightening fast, report errors better, have fewer ambiguities and problems, and do the job "fast enough". Ditto for all the scripting languages around.
So frankly, it's getting to the point where being EXACTLY like "C" isn't a selling point on ANY level. Being "C-like" sorta helps a transition from a 'habit' sort of point of view, but really isn't that necessary any more.
- Spryguy
Re:Well, don't use it, then! (Score:2)
Therefore a new language may differ significantly from past languages.
Does CSS offer any significant new advancements? If not, then why bother? We have plenty of scripting languages. Some bad, and some excellent.
--
"Linux is a cancer" -- Steve Ballmer, CEO Microsoft.
Re:Pascal is THE scripting language for UIs (Score:2)
Today, there is no wisdom to use Pascal as the only teaching language -- and I wouldn't even make Pascal a major focus.
One could argue, Pascal is still good in teaching environments where you want to compile to native code. Although there are other, but less popular choices, such as Modula-2.
By the time students reach the stage where they write performance critical code (i.e. calculate the mandelbrot set), they can probably use C/C++ or something mainstream.
--
"Linux is a cancer" -- Steve Ballmer, CEO Microsoft.
Wierd. (Score:2)
Pascal is THE scripting language for UIs (Score:2)
Pascal predates C by decades and its maturity is obvious to anyone who uses in for any length of time. As we all know, the orignal Mac up to System7 was done in Apple's ObjectPascal and there are still various development tools that rely on Pascal based scripting including Borland and several other Windows based development environments.
I'm not saying Pascal is better than C all around, but when it comes to scripting a user interface that simply calls upon functions written in a lower level language, I can't see the point of using anything else other than simple ignorance of the alternatives.
In educational multimedia, Pascal is king. This is an ugly market to a lot of slashdotters as it is a market where a lot of content experts rather than nerd-core geek "programmers" publish software with emphasis on ease of use. But if Linux is to really take market share from MS in the education market, there will have to be better Pascal-based development tools for making quick and easy user interfaces.
So, yeah, this idea sounds like a misguided student project which further underscores my point about getting better multimedia scripting environments for Linux into education.
Other scripting languages for MS Windows (Score:2)
For scripted control of setup and execution of Windows programs, including tasks in DOS windows, C Styled Scripting seems excellent.
Auto-It does this, and it is free, but it is not open source: http://www.hiddensoft.com/AutoIt/ [hiddensoft.com]
Wilson WindowWare's WinBatch does this, and it is comprehensive, but it is not-free shareware, not open source, and I have had problems with poor documentation and poor technical support: http://www.windowware.com/ [windowware.com]
Question: People who write open source software often pick poor names for their work. Why is that?
Re:CSS (Score:2)
Here is another way then to annoy the MPAA-- create a Deconstructor for CSS and call it DeCSS... Then when they complain, simply leave it at "I fail to see how your complaint has anything to do with the software at hand..."
Re:Not to nitpick... (Score:2)
CSS++
Has a nice ring to it.
This language should be moderated -1: Redundant (Score:2)
Shouldn't have GPLed it (Score:2)
Of course, in the end the choice of license is completely up to the author of the software... so be it.
Re:C doesn't make a good script lang. (Score:2)
This is certainly true, but having to do such thing all the time would be a drag... if I'm writing a PERL script that is going to be around for a while and maintained by others, I usually go with "use strict". If I'm just writing a quick one-off to do some specific data munging (or whatever), I can be as sloppy as I want. I suspect this CSS won't be as forgiving.
Anyways, maybe "not having to declare variables" was a bad example. Perhaps a better example would be more natural reg. exp. usage in Perl and Python, whereas this CSS seems to make use of a clumsy library, and other areas where Perl and Python have things "built in" that this CSS doesn't.
Ryan T. Sammartino
Re:Oh goody... (Score:2)
Ryan T. Sammartino
Re:or use a sane compiler... (Score:2)
Errrm, "is" not the same as "==" in Python in all cases. "==" will check for equality, "is" checks to see if they are the same thing. When you're talking about objects, there is a difference.
new from copyleft.org! (Score:2)
So many scripting languages... (Score:2)
Re:How? And what's the point? (Score:2)
With languages as complex and daunting as these, it's up to the coder to get a handle of things. They don't pay us upwards of 6 figures for nothing. I find it interesting, by the way, that you mention C/C++'s intolerance for error. In C there isnt' much you can do aside from check for NULL pointers, etc in hopes of catching situations before they go awry. I'll give you that. In C++, however, we're given a rather robust exception handling mechanism. The only chore involved is learning how to properly use it (and in my time I've noticed few engineers truly do.) Additionally, in C++, your annoyance with pointers are solved by references.
I can tell, however, that you haven't spent much time in assembly. You'd probably bust a vein in your forehead over ASM's intolerance for errors.
Honestly though, you'd be hard-pressed to find any language better suited for a good 99% of all software development problems (and I'm not talking about pretty GUI driven database apps).
-[McP]KAAOS
The more the merrier, I say (Score:2)
Having lived through the little-language-dark-age (call it mid-eighties to early nineties), when it sometimes seemed like C and BASIC would drive out everyone but Chuck Moore, Ralph Griswold, and few Lisp hackers holed up on a farm in Montana, I am glad (no, strike that, I'm ecstatic) to see all the effort going into new (and sometimes not so new) languages. Carl, Larry, Guido, Peiter, and the thousands of others whose names don't spring to mind at this instant have my heartfelt gratitude. Personally, I'd much rather live in a chaotic world of plenty where, no matter how I want to spell "FOR", there's a language for me.
-- MarkusQ
Anyone old enough to remember (Score:2)
csh considered harmful? Is this a reincarnation of the C-shell, but now we can run it everywhere? Good Ole' Bill Joy will be happy.
OK, I'll admit I didn't read the article, and I bet it has nothing to do with the infameous csh, but I'd thought I'd mention it anyways.
Giant Step Backwards (Score:2)
There are already so many scripting languages available that a new one needs to offer some compelling feature. I'm running down the list of "CSS" features..
C syntax: Not really a feature. If you are a C programmer I suppose having something familiar is a bonus however.
Sophisticated error handling by exceptions - Perl, Python, and Ruby already have this.
High performance database libraries - Perl already has the very sophisticated DBI database interface. Python is at version 2.0 of its database API specification. A DBI interface is currently in development for Ruby.
Automate regular tasks or build application benchmarks with the outstanding windows control library: Perl, Python, and Ruby already have good windows integration.
Develop libraries to meet your special requirements using your favorite C/C++ compiler: Perl, Python, and Ruby can all be extended via C and/or C++
Develop libraries to meet your special requirements using your favorite C/C++ compiler: Ruby is embeddable in C applications. Python is embeddable in C and Java applications. Perl is weak in this area, but I believe Perl 6.0 is supposed to be easily embeddable.
Write CGI programs for your web server: You can write CGI in numerous scripting languages already. In addition, mod_perl allows you to directly access Apache's module API to write extensions to Apache itself. Then of course there is PHP although I do not consider PHP a general purpose language. Pike / Roxen is a viable contendor in this area as well.
A major feature that I see missing in "CSS" is OOP. Python and Ruby, two of the newer generation scripting languages, have very powerful OO features. Ruby is object pure... everything in the language is an object that is extendable down to basic types like strings and integers (similiar to smalltalk).
From my perspective using "CSS" instead of one of the next generation scripting languages (Python and Ruby) is a giant step backwards. In addition, the old mainstay Perl is a very mature language with an unparalleled library of available modules for it. What is the incentive for using "CSS" other than the novelty of having a C like syntax?
By the way, the name "CSS" was a HORRIBLE choice.
Re:How? And what's the point? (Score:3)
It has a c-like syntax, it has the preprocessor, and it has classes (full OOP), functional programming if you want, a nice runtime library. It doesn't have pointers, but it has references (no arithmetics though), and high-level constructs for strings, sets and associations. It does manage memory quite fine (refcount + garbage collector) and you can make it as pedantic as you want, even not at all (just use the mixed type everywhere).
This said, you won't get rid of the C syntax anytime soon. It has an advantage over most other syntaxes one can come up with for an imperative language: it's concise. And if used with some discipline, it can be very readable which is one of the most important requirements for a programming language. By adhering to a c-like syntax, any other programming language can be instantly readable by a lot of people.
Comment removed (Score:3)
Boycott CSS! (Score:3)
Re:C interpreters (Score:3)
http://www.swig.org/
Re:How? And what's the point? (Score:3)
I've been programming in C++ for 7 or 8 years, and find it to be fantastic for expressing what I want to produce. I find it much easier to write code that's easy to debug and maintain than any other language I've ever dealt with.
Now, granted, a lot of that is due to a very detailed process that we go through before even writing the code, but well designed C++ systems can be quite easy to maintain.
I've written several large systems in C++ and found it to be very easy to maintain and debug. My last major system had over 150 classes in a very well designed architecture. Although more than 30 people were involved at various times during it's implementation (over a 5 year period), in the end, there were two of us maintianing it and adding new features. And when I say new features, I'm talking about major additional functionality.
Now, could Java do what this system did? Yes, but probably not at the same speed. This was a very mathmatically intensive system. It modeled cellular telephone networks (the antennas at base stations as well as the mobile phones).
I still like C++. I like it a lot. It has made my life much easier. Until I find a language that's going to make my life easier, I have no intention of changing.
That said, is C++ the best language for every task? Of course not, and I certainly don't use it for web scripts. Everyone has their own reasons for choosing a language, though, and as I'm very C++ oriented, a C style scripting language would probably be very easy for me to adapt to. Perl sure as hell wasn't easy for me to adapt to.
CSS (Score:3)
Already done -- CPR (Score:3)
you'll see that Inline::CPR lets you do this.
tada! interpreted C.
Paul
Small, the C scripting language. (Score:3)
from the site;
Small is a simple, typeless, 32-bit extension language with a C-like syntax. A Small "source" program is compiled to a binary file for optimal execution speed. The Small compiler outputs P-code (or bytecode) that subsequently runs on an abstract machine. Execution speed, stability, simplicity and a small footprint were essential design criteria for both the language and the abstract machine.
Write your Own Operating System [FAQ]!
Re:EiC (Score:3)
I can't believe I had to read this far down to see a mention of EiC. First, and this is important...
...one of the best things about EiC is that it is NOT merely "C-like". EiC tries to follow the ANSI/ISO standards as closely as possible and does a very good job of meeting C90. Last I heard, C99 support was in the works.
Whenever I hear "C-like" I always get suspicious, and it almost always turns out that the syntax is not true C. Based on what other people are saying, it looks like the article is mentioning yet another one of those, and if that's true I have no use for it.
As for the people who are wondering why people want scripting in standard C, here are my reasons:
1. Code re-use. With a babel of scripting languages, you are duplicating functionality at times. When you do your scripting in C, you can take ideas that started out as scripts and easily incorporate them into powerful programs at a later date. Likewise, you don't have to translate the large body of C source code floating about into some other language--you can just use it.
2. Rapid Application Development, which ties in closely with point 1.
Long live C! Although I haven't actually tried it, I plan to use a C to Java translater, make, and javac to build Java applets without actually writing Java.
The only new language I want to see is a metalanguage analogous to PBM so that I can maintain all my code in C, run CtoPBMlang and PBMlangtoFOO with make to build for whatever scripting environment is required.
It's funny to think that programmers are trying to write translaters for human languages. We don't even have reliable automatic translators for the far simpler languages that we have invented for programming!
Re:Turing equivalence? (Score:3)
The thing I find amusing about this is that languages like Lisp provide this exact functionality without the truly cryptic syntax (although you could argue that parentheses are replaced by angle brackets).
Re:Worst language ever! (Score:3)
Ok, first of all why would you want pointers in a scripting language? It's a SCRIPTING language we're talking about here!!! Scripting languages are supposed to be an easy way to expose the functionality of a program, not a tool to create security holes and logic errors. Introducing pointers into something like this will create more bugs (both intended and accidental) and be a major pain in the butt for the script programmers to deal with.
Also, since when is goto a major feature of C? One of its very few legitimate uses is to break out of a deeply nested loop. Ok, so other than this one use (which optimizes some code only some of the time), what is it good for?
Finally, #defines are a nice feature of c, but again, this is a SCRIPTING language. If you just need a constant, declare one const. If you need a function that returns the bigger of two numbers, write the function! I fail to see what features they've left out that are really needed in a scripting language. p.s. I do agree with you that CSS is a pretty bad choice of acronyms.
Re:Pascal is THE scripting language for UIs (Score:3)
The wisdom of using Pascal for teaching was before there were Modula-2 and Oberon.
Pascal was a great teaching language when there was Fortran and C. Late 70's, early 80's.
Vendors extended Pascal enough to make it commercially useful. Thus creating many incompatible dialects.
Modula-2 corrected many Pascal mistakes. But by that time C had achieved a lot of mass on the PC.
A serious Pascal design mistake that Modula-2 corrected (and C did correctly already) was NOT to design I/O primitives into the language, but rather make them part of the standard library.
As for today, there are far better teaching languages. Most young 'uns today were wearing diapers when some of us were learning Pascal/C/Modula-2/MS-DOS/Lisa/Macintosh, etc.
--
"Linux is a cancer" -- Steve Ballmer, CEO Microsoft.
Re:Turing equivalence? (Score:3)
Well, you can do template metaprogramming, but I believe it involves a little more than just the preprocessor. For example:
template < unsigned N > struct Fact
{
enum { Val = N * Fact < N - 1 >::Val };
};
template <> struct Fact < 1 >
{
enum { Val = 1 };
}
#define FactT( n) Fact < n >:: Val
Conforming compilers will reduce FactT(5) to a constant.
References:
* Chapter 1.2 of "Game Programming Gems" (that's where I got the example from)
* "Using C++ Template Metaprograms", C++ Report, May, 1995
Pretty whacky eh?
Ryan T. Sammartino
Re:Turing equivalence? (Score:3)
I saw a paper a while back on numerical computing (I tried to look it up, but alas, I don't remember enough of it) that used these kinds of tricks to do all kinds of neat numerical analysis while compiling. Strange use of templates.
Just use PHP... (Score:4)
So what's new? (Score:4)
Moderation??? (Score:4)
proposing using GCC as a a just-in-time compiler.
I was thinking of doing just that for an embedded
app where you need users to script but you also
need real-time code. OK, so maybe not with GCC,
but the idea is valid and serious.
#!/usr/bin/perl (Score:4)
Seriously though, do we *really* need another scripting language? We've got perl, python, rebol, scheme, csh, bash, sh, ksh, [insert favorite scripting language here]...
How? And what's the point? (Score:4)
How does a scripting language plan on implementing the preprocessor? If it doesn't, then should it really have "C-like" in the name?
The other issue is... what's the point? I hate to tell people this, but C/C++ are two of the worst languages on the planet. I say this as a long-time C++ hacker and C++ enthusiast: the languages are awful. There are pointers all over the place, there's God-knows how many levels of indirection, there's detailed memory management... C/C++ are so powerful because they give you such fine-grained control over every aspect of the CPU. But they're cast-iron bitches to program in, because they're so intolerant of any error.
Scripting languages, on the other hand, are inefficient. They're slow. But they're also wonderful to program in as a result--their syntax isn't as rigorous, there's very little memory management to be had, there's no need to know the difference between the register and auto keywords, or the difference an inline amd a macro.
A C-like scripting language seems like the worst of both worlds. You've got the pedantic syntax and attention to detail of C, and the lackluster performance of a scripting language.
What's the point?
Re:C doesn't make a good script lang. (Score:4)
However, there are more uses for a scripting language than just quick one-off scripts. As mentioned in the article blurb, this language can be embedded within your own applications to provide scripting support.
C doesn't make a good script lang. (Score:4)
Also, naming it CSS is pretty confusing, given that CSS already equals Cascade Style Sheets.
Anyways, how can I get my SourceForge project [sourceforge.net] on the front page of /.? :)
Ryan T. Sammartino
Do it the right way (Score:4)
If you're a pretender, you might write a wimpy interpreted version of C.
If you're a real software architect, however, you'd #include the gcc source tree right into your app, compile the user's code on the fly, pipe the output into a memory-mapped file, and long jump straight into the results. Damn the torpedoes.
Make no compromises on the performance of your users' macros. If they're worthy of your program, they need the speed. If they're not worthy, they'll write some lame pointer bug and dump core; I say good riddance to those lusers.
RTFLanguageDescription (Score:5)
* Variables must be declared but are untyped.
Like Tcl, everything appears to be a string.
* There are no pointers (though there are
call-by-ref parameters).
* There is no memory management, though there
is a way to dynamically change the size and
dimensions of an array object.
* There are some extensions, such as
exception handling and string concatenation
* There is no "goto" construct.
* There is a limited preprocessor facility
(#ifdef equivalents, but no macros).
Overall, it looks like a rather nice embedded scripting language, though it's not nearly as cool as embedded Scheme
C interpreters (Score:5)
Here's something I would like to see: an interpreter for C code that follows exactly what gcc would do. Then you could make a nice GUI environment for programming, where everything happens as you type it with no compile cycle. Then at the end you compile everything to get speed.
I am (Score:5)
Re:Not to nitpick... (Score:5)
Not to nitpick... (Score:5)
Or am I just blind to some bigger picture?