Jump to content
11 hours ago, Dat Guy said:

If it was about the best language, you should write your websites in C. But many webhosts won't let you run FastCGI applications for security reasons.

I'm trying to understand your perspective on things Dat Guy. C would be a great choice of language if you needed something really fast, like, seriously fast. If that were the case, then maybe one would consider running FastCGI with C (preferably with NGINX) to do whatever it is one needs to do. But wouldn't one be, in essence, introducing code complexity for efficiencies sake? If you need efficiency, then fine - but if you don't, why wouldn't you offload the responsibility for say, security, maintainability and complexity to someone else by choosing to use a pre-existing framework (Rails, Django, Laravel, etc). Sure, it might be a bit slower, but it's faster to get off the ground and no ones going to have a nightmare of a time trying to maintain it.

 

So, I had a quick google search and it looks like there's maybe one or two frameworks written in C, so maybe it is the future, and I guess if one is writing a microservice, it doesn't really matter what it's written in - the faster the better?

 

As for everyone else discussing the merits of PHP in this thread. It's really not that bad. There have been some issues with the language, this for example (I mean, jump tables are pretty straight forward, it took until PHP 7.2 to implement this!?). And it use to be seemingly bad, but that was mainly due to people writing bad code. PHP was easy to pick up and it was quick to get something up and running, so loads of people hacked a bunch of bad code together. Modern PHP is really not that bad.

Link to comment
https://linustechtips.com/topic/883763-php-beginner/page/2/#findComment-10919575
Share on other sites

Link to post
Share on other sites

12 hours ago, Dilworth said:

But wouldn't one be, in essence, introducing code complexity for efficiencies sake?

C has an amazingly low code complexity when compared with "modern" web languages. Do you really understand how (e.g.) PHP works? Do you know what that Zend stuff you are (probably) using when writing PHP is actually doing? Or - even worse - Node.JS?

 

If everything that matters to you is the complexity of code you write: Is there any language that prevents you writing obfuscated code? Not even Python!

 

Quote

why wouldn't you offload the responsibility for say, security, maintainability and complexity to someone else by choosing to use a pre-existing framework (Rails, Django, Laravel, etc).

Because of the ridiculous overhead and the potential security implications of a third-party block of code which might or might not be actively maintained. Plus, if something fails there, I would have no easy way to find out why.

Just piling up frameworks has never solved a problem.

 

Quote

I guess if one is writing a microservice, it doesn't really matter what it's written in - the faster the better?

Why do you limit that to microservices?

 

Quote

Modern PHP is really not that bad.

I agree. It is even reasonably fast now.

 

Addendum: No, you should not use code you did not read first.

https://hackernoon.com/im-harvesting-credit-card-numbers-and-passwords-from-your-site-here-s-how-9a8cb347c5b5

Write in C.

Link to comment
https://linustechtips.com/topic/883763-php-beginner/page/2/#findComment-10920878
Share on other sites

Link to post
Share on other sites

Guest
This topic is now closed to further replies.

×