Nicolas, Speed of development, ease of development, maintenance, available frameworks, available Perl modules.
I actually know C the best of any language and will very happily code in C, but for some things its quicker to develop it in out in Perl. Certainly for anything involving ?interesting? text manipulations Perl is far, far quicker. We use the DBI module for database integration which we use with SQLite BUT we could change that for PostgreSQL or <spit> mysql in a few hours. As an example I built a very simple restful server in Perl using Mojoliscous in around two hours this afternoon. The other two hours was coming to the conclusion that SQLite was not the bottleneck anyway in the webservice :) Now if I had to build that in C I?d still be reading the manual on sockets and programming them and trying to remember various flags. I have no doubt I could write something that worked but it would take me an awful lot longer. It would also be an awful lot bigger. A lot of Perl is very, very, very fast. People write modules in C that integrate into Perl and simple slot in. You get the coding speed of C with the <cough> ease of maintenance and development of Perl <uncough>. Code speed close to C is not uncommon. Its also very mature as a language, though I dip in and out of object orientated Perl and back to traditional Perl as I see fit. There are disadvantages to Perl: 1. its single threaded so high clock speed is good or you need to break the problem down into different processes. 2. People (myself included) can write the most awful code imaginable. 3. The CPAN modules can be waaaaaaay out of date and unmaintained. 4. Memory management consists of stopping the program to free the memory. Mmmm?. 5. The syntax can be obtuse. I was a beta tester for Perl about a zillion years ago and it was a little archaic then. 6. Writing regular expressions is great but it can lead to code that looks like noise on a modem line. 7. You can end up with the same dependency hell as any other language. 8. Any other Perl coder is as old as me. However as an example of what you can get, we do a lot of natural language programming and Bayesian maths in our system. We needed a language stemmer. Writing this would have taken us weeks , if not months, all of these modules were available on CPAN. We installed them and got up and running in hours (well a few days). Try that in C or JavaScript or PHP or C++ or Java. I suspect Lisp would work though. Hope that helps, Rob > On 17 Sep 2015, at 17:30, Nicolas J?ger <jagernicolas at legtux.org> wrote: > > hi Rob (Willet), > > May I ask why are you using Perl instead of C/C++ ? I'm not going to start a > debate, I'm just > curious. > > > regards, > Nicolas > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users