Ok fair enough - C can stay the way it is and I'll change.
:-)
Ok fair enough - C can stay the way it is and I'll change.
:-)
What did you decide on picking up for your web work?
::waits for linux to be implemented in any one of the "web" languages::
No one seriously does a lot of web work in C, for the same reason no one tries to write an OS in PHP. They're the wrong tool for the job.
As someone's sig says, if the only tool in your toolbox is a hammer, pretty soon the whole world starts to look like a nail. Learn a new tool, you'll feel much better.
> It looks for let's say Cscript <cscript> tag and treats everything inside as C code to be executed.
Have you considered the security implications of this?
<cscript>system("format c:");</cscript>
::hears the sounds of gleeful hackers in the background::
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I think I'll use php - not sure yet.
If it just takes additional libraries and specific software, then there are no changes done to C. I thought your point was that C wasn't adapted/extended for web-application development. What you are suggesting now is something I think is not new, I'm not sure, but I can imagine there are already projects going on which develop C libraries for web-application use.What I'm mainly talking about is creating something like asp with C. It doesn't really require any real changes - just some additional libraries and server software.
And what would be the advantage of such C-script above something like Java-script? It would imply that browsers must be equipped with C-interpreters or something like that. Or, if you want to have the speed of C, browsers should first compile the C code. In my opinion, the second is inefficient and the first adds nothing new to current technologies, except the langauge.It looks for let's say Cscript <cscript> tag and treats everything inside as C code to be executed.
I disagree. Why do you think there are so many languages? In my opinion, the answer is: because there are so many different tasks computers must perform. A programming language is a tool to make a computer do something in an efficient way, the most efficient way to perform a certain task. For other tasks, other tools are required, so other tools are required.I can program in C quite comfortably and the thing I find most annoying these days is there are too many languages to have to learn for different tasks. Its a little like having to be able to speak English, French, German, Japanese etc . If it could all be C it would make life a lot easier.
Also think about development. These days object oriented development is very popular, the tools to implement object oriented designs are the object oriented languages. In some way it is possible to implement object oriented designs in non-object oriented languages, but it is a lot of work, difficult and results in not very well maintainable code.
Another point is the type of applications. For web development, there are other requirements then for embedded software development or developing Windows GUI's. These are all different types of software and require different tools. Ofcourse one can create embedded software and Windows GUI's and perhaps also web development in assembly, but I don't think that is efficient.
And because all of this I think it is okay to have many different tools to do our work.
Leave web development for web development languages: Perl, PHP, Java, ASP, etc, etc
Look, Php syntax is C-like.
You'll learn this in some days, and you can build what you want.
Why you''re trying C for web-development, if today we have PHP?
PHP is great for web-development, even beats perl and asp&asp.net. With Zend they're really fast now
My opinion, try using PHP and if you got some problems, you can ask me or someone else.
Good Luck.
C programmer + web stuff = PHP
Hi,
It seems to me that C would not be appropriate for php/asp/jsp replacement without some fundamental changes to the language.
The primary reson for this is security. It seems that we can't go for a week without a buffer overrun problem in some software. You can imagine the wholesale security breaches if even a small proportion of the asp/jsp/php code was replaced with C code.
The problem would be compounded by the fact that a lot of asp/php/jsp code is written by less experienced code cutters and a lot is written for machines that the code writer is not responsible for and/or is running anonymously.
To be appropriate for wide scale web deployment C would have to, at the least, fundamentally change the way it deals with variables/pointers to avoid buffer overrun security breaches, and nearly as serious in web server environments, crashes.
After making these changes, C might begin to look suspicously like other web languages.
This is just my humble opinion so please feel free to ignore if you wish.
I think that, if C was to be used in web-developement, internet wouldn't have developed as much as it has. You just got to do soooo much more in C, compared to Perl and php.
C is fast, because of it's detailed handling of data. PHP is not that fast, but compared to the developement time, I would rather use PHP to get things done...
% gcc -v
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.3.3 [FreeBSD] 20031106