C++14 has enough features that would be to forget about PHP?

I have already derived the idea of creating sites in C++ in my native language. But earlier it was not rational.
The other day I got acquainted with the draft C++14, and I would like to know from those who read more and have already mastered C++11, there's plenty of opportunity, that would be just as quick to rivet shit sites, only in normal language, with the appropriate allocation?

(For raging php schnick, complement, I do not like this. This is the entire language. )
$a = "2d9"; $a++; $a++; echo $a; → 3
$a = "2d9"; $a+=2; echo $a; → 4
$a = "2d9"; $a++; echo $a; → 2e0
October 3rd 19 at 03:09
11 answers
October 3rd 19 at 03:11
C++14 has enough features that I could forget about C++
You meant C++98? I don't think it is necessary to solve all fundamentally on the delegates and C code. - Margarete.Hal commented on October 3rd 19 at 03:14
I think there was a mind that C++ with its new features, from incredibly complex turns into a language which the few are able to use it to the fullest. As a result of losing control over what is happening, but in C++ this can not be tolerated. - bessie41 commented on October 3rd 19 at 03:17
October 3rd 19 at 03:13
Well, if you want a lot of gemologica himself into a sitting position, the health.

Profit from C++ is only possible if very complex calculations and multi-threading. And for every detail which is mainly working with databases and files that will suit absolutely any language of words. If you want to go with PHP, look at Python for example. But the pitfalls are absolutely everywhere.
Ie you claim that C++14 is not yet ready, for that would make the site without hemorrhoids? Sorry.
And what exactly is missing? In the third-party type libraries boost, this is not implemented?

I don't want to leave php, I want to forget about interpreted languages. About most of them. (For example, I love Lua) - Margarete.Hal commented on October 3rd 19 at 03:16
Yes, there's not even really C++ and not in C++14. In fact, in C++11 gave very much. The main problem is the support standard, it is necessary to communicate with gcc (using 4.8.1 and 4.9), msvc (2012, 2013). Declared full support for C++11 in gcc speak, but that support does not become full. The regular season is still not working, lots of bugs, defects. Lambdas don't capture variadic arguments. Bugs with nested lambdas. Msvc have it worse. unfortunately clang did not feel. Sane C++11 support is unlikely to appear before 2015, with polyxenida bugs and with all necessary modifications. And C++14 can not be expected before the year 2016.

Again, this is an almost complete lack of frameworks for the web. The current is semi-corpses, and even a complete corpses. Which in principle does not develop.

In C++ to do much touch the screen at once, but is this rational. We have now the main development for the web is in C++, to be honest, I really want to move all PHP, so a lot of time is spent on catching bugs and memory leaks. And writing the code itself is not quick. - bessie41 commented on October 3rd 19 at 03:19
Question rationalize really worth put off. I was lucky not to lose her memory, so compared with C++ and PHP, I can only see fewer opportunities, and more dangerous the bottom(read: more pitfalls).
According to statistics, in C++, I am a fool, overlooked, overlooked. PHP is not obvious(unexpected, common sense is not your expected), but well-documented behavior(which I didn't because didn't find the book: surprises in PHP), or consumption in concepts between C++ and PHP(and then I am a fool).

I'm talking about the standard, I sensibly understand that tomorrow jump will fail. Just the other day was a good article about IPv6, and I thought that now also on the shelves will tell you that nested arrays of different types can now be packaged in this way and it is so. But this is impossible, and will be, as you said "crap".

Me, grown up on DOS and ASMx86, like control. As much as possible. Creating a long-polling app, I want to lose only as much memory as necessary. I hope to motivate my desire is not necessary. Please take for granted — I want in C++. And then to know — is it convenient to 2016-2018-2020 year will do it? Because PHP already does development not getting. - Margarete.Hal commented on October 3rd 19 at 03:22
And then to know — is it convenient to 2016-2018-2020 year will do it? Because PHP already does development not getting.

I do know some pros and more know PHP. But I think it is clear that to add features in any of the scripting language is much faster than to do it under a compiled, especially a monster like the pros) - Jaclyn_Ro commented on October 3rd 19 at 03:25
I was developing 2 different independent web frameworks for C++, the task is very difficult. In the end I chose for myself is easier to get boost::asio to do exactly what you need, from power after a few classes, for example, a full parsing HTTP requests.

If compilers worked perfect, then most problems would disappear, but alas, to work perfectly, they never will. A further problem is in their old age, Yes, there is gcc 4.8-4.9, but not everywhere it is possible to have these versions in production, we sometimes loose even 4.2.1. Whereas with the same PHP in this respect fewer problems. - Margarete.Hal commented on October 3rd 19 at 03:28
hell0w0rd, but as far as I can see the progress of C++ is in the last 10 years faster than in PHP.

AxisPod, I'm not talking about pure C++, without external libraries. - buck commented on October 3rd 19 at 03:31
Offenso, the problem is that third party libraries are either dead or they do not. - Jaclyn_Ro commented on October 3rd 19 at 03:34
Offenso how to say) under php recently appeared phalcon(framework is also written in C). Applications written on it at speed comparable to apps on the Go, memory eats not much. Now engaged in writing translator with php-like language to C. the extension. I'm — if you want to write the logic in a compiled language, take a core scripting language and imagine that's your framework. Each scripting language has the ability to extend using C/C++ extensions. - Margarete.Hal commented on October 3rd 19 at 03:37
hell0w0rd Damn, how long will people think that C++ choose only because of the speed. I think it is just totally comfortable, I think this language. I can compare it is that with PostgreSQL everything that does not want written.
I want to use all the power of C++98, without hemorrhoids. So I wondered thought, and maybe partially compatible, but more convenient C++14 is out?
I can compile PHP into bytecode, eliminating the parsing at run time. I'm a programmer. Just like C++. - Jaclyn_Ro commented on October 3rd 19 at 03:40
I personally involve C++ template metaprogramming. For a web application is, there is a real convenience. Slowly make your IoC container for C++11 for web again, it is very applicable. But it takes way too much time, it is not always profitable. Or, for example, did the wrapper for the ClearSilver template engine, connect as and became very comfortable, though, and lost the possibility of an arbitrary number of arguments for them. Or rather just not doing them. But now in the functions is written only part of their content and do not require any code to parse the data in ClearSilver, it is very uncomfortable it out of the box. But again, it eats up a lot of time. - buck commented on October 3rd 19 at 03:43
October 3rd 19 at 03:15
And you looked in the direction Go? I forgot about the PHP with the arrival of Go in my life. I don't really do sites and services, but one is not much different from the other. Go as C compiled (speed, low memory consumption), but it is very comfortable to write on PHP or Python.
You can make friends with nginx.

Here is a selection of web frameworks in that language
robfig.github.io/revel/
www.gorillatoolkit.org/
webgo.io/
code.google.com/p/gorest/

I use this — github.com/stretchr/goweb
Simple and easy.

Owner at Go — www.golang-book.com/
Thank you, but I would not like from the bosom of the C++ escape very far. I like when the syntax is close. - Margarete.Hal commented on October 3rd 19 at 03:18
October 3rd 19 at 03:17
I was very surprised by C#. myself have been programming mostly in php, and at work a new project was started on the sharp. was very surprised as it is very simple and quite convenient.
October 3rd 19 at 03:19
No, first you need to write some garbage, to hint that php G. but php'schnick Talpiot, and then tell me that "I didn't mean to offend anyone", "I'm here at all about php"...
php normal, but from Mr. but the coders who wrote three programs and the seniors imagine themselves to be severe in 20 years and friends Hry PM timidly, these seniors interviewing for a large, are in deep trance - Margarete.Hal commented on October 3rd 19 at 03:22
You are free to see what he wanted. I wrote my opinion deployed only when asked. I did not like the personal contact with the dev-team PHP, so I'm biased reasoning.
However, even this explanation is not enough, what would your colleagues have to answer for sushestvu, and not to offer other interpreted languages.
No offense, but I really don't like PHP. Accept it. - bessie41 commented on October 3rd 19 at 03:25
I don't like and I still do it or not. But if I decide to take out their dislike for the public, do not take the position that I did not say this and none of your damn business.
The experience of the snobs and haters of PHP, this former php hounokidaira who try to go to honokowai into another language.

And I do not know where in the C-14, but I remember earlier, a char and a byte were the same thing. So int a = '0'; a++; — Wau, '1'!, but '0' + '1' is already hell knows what. Arithmetic and string operations in General, it seems that the pointer operations were reduced. - Margarete.Hal commented on October 3rd 19 at 03:28
You have mess in my head, and you're talking about C89-C99, I start from C++95.
The point is simple, don't ask for my opinion, and I'm not going to publish it. You would only be on the ground holivarnaya question to settle.
What exactly are you, specifically in the matter of hurt? Where there I expressed my opinion which is then refused?? I wrote that this behavior is inappropriate, isn't it?

In C89 there is no built-in type byte, in appeared in Microsoft, BYTE, and they are partially similar.
And I think in terms of ASCII table what you have written is absolutely true, try as in physics, to add dimension. In PHP types are lost. I do not like.

Duck here, rows as type in C89 does not exist, you operarate with pointers. In C++ the same string concatenation not defined in the library, but you are free to write their concatenation.
Moreover, if I am not satisfied with fucking assertions(and in php it does not suit me), I can just override.

May already be enough to spend our time, we will concentrate on the subject matter? - Jaclyn_Ro commented on October 3rd 19 at 03:31
October 3rd 19 at 03:21
On the pros is still to cut the sites. Take the battery (boost), web server (my choice — mongoose with self-made wrapper), template engine (for example, cpptemplate), the database (in simple cases — to store all in memory and dump to disk. In the middle — how to use any of the heap dB, both external and embedded direct inward bend. In difficult — to keep that data in memory, part on disk to load when necessary, and not to forget even logging). Then take bootstrap & jquery (or any other frameworks to taste) and zapilivat exchange json-AMI. You can even websocket s to tie.
Speed of development — when adjust — will not be too hard to merge interpretership. For easy development you need to have a custom build system libraries, ide, able to work with data on a remote machine (for example, QtCreator) well the car that is not very long to rebuild.
Merge're the same because:
— to compile (quick 5-10 seconds for a project with a set of libraries navryatli acceleration. though..)
— library (there infa to stick to the build system Libu and write for it a wrapper somewhat slower than zayuzat ready for popular web languages)
— bikes (don't know the pros normally implemented by the web component, ie, cms, web frameworks, etc). In the end you will have your own framework, with blackjack and hookers memory leaks and a bug fix which you will have to spend time exceeding the time of product development
— the speed of the brain. There infa that if the brain of the time thinking about which object whom vladet and someone who when he kills, another part, as if to wrap the first part in products-usability and abstraction of a pattern then apply another part of that strange message about the error in some third-party library that has entered into a strange relationship with svezhenanesenny shitcode, don't forget about static typing and perverted development experience of standard solutions (Yes, the same split) his performance is somewhat lower than that of the brain, thinking mostly about food logic.
— error compiling, linking, segfault-s, errors of multithreading, memory leaks in General the complete package for true connoisseurs :)
Thanks, but can you recommend something with associative arrays?

The library I found, under their choice, or too small, or bend over MVC, without the possibility of extension. (All the sympathizers, I didn't find at the moment, and it is not necessary that injustice be fixed with advice). And so on their bikes and ride.
Problems with memory loss do not scare me, I'm genuinely surprised why so swear it, handlich one of the easiest in C++, so for example, flows(conditional race) more difficult for me. hence about the speed of the brain, thanks, but not true.
===
Anyway, I'm happy for candling cons, but I would like more emphasis on that than to use. - Margarete.Hal commented on October 3rd 19 at 03:24
std::unordered_map is a standard hash table. Well, if th the normal map always in the pros was.
Well, what prevents to begin to use right now? What is missing? - bessie41 commented on October 3rd 19 at 03:27
I have no derivada difficult to maintain an associative array of the different types.
It is not a rare situation when one array(and later json), you need to pass a string, number, and nested array.
Just before release it should be a separate classes — color, picture, and more what then is serialized to a string, and a link to the picture. For example - Margarete.Hal commented on October 3rd 19 at 03:30
Advantages are static typing. If you have in the array can be string, number, and nested array — it means you are doing something wrong. The pros for this is classes.
Not to be unfounded — give a specific example of when you want it. Oh and by the way, if you really really want — use any boost. Or you can use json objects, for example from jsoncpp — they just can store everything but I do not recommend their use for anything other than sterilisatie. - Jaclyn_Ro commented on October 3rd 19 at 03:33
bak, nothing clever to come up with, I am not going. The result set from the database that contains arbitrary data, among other things, one mole is a two-dimensional array. - Margarete.Hal commented on October 3rd 19 at 03:36
October 3rd 19 at 03:23
Honestly, for myself, I appreciated the simplicity of web development in C# + Asp.Net MVC + jquery/twitter bootstrap.
October 3rd 19 at 03:25
About the objectivity of using C++ is you've already been written. Let's explain about the are not satisfied with your PHP logic. But in other order.

<?php $a = "2d9"; $a++; echo $a; → 2e0</property-->
<br / > a — string. Increment line (which is not an entry in 10чной SCH) is <a href="http://php.net/manual/ru/language.operators.increment.php">on the principle of Perl</a>: "A"++ = "B", "Z"++ = "AA", "AA"++ = "AB". So we get a "2e0".<br> <br / > the <pre><code class="php"><?php $a = "2d9"; $a++; $a++; echo $a; → 3</property--></code></pre><code class="php"><br> If the string contains something similar to 10чную SCH, we bring to the whole and incrementorum. The second increment gives "2e0" = 2*10^0 = 2. 2++ = 3.<br> <br / > the <pre><code class="php"><?php $a = "2d9"; $a+=2; echo $a; → 4</property--></code></pre><code class="php"><br> Arithmetic increment without immediately causes the string to number, and we just believe 2+2.<br> <br / > Normal logic when you consider how PHP is used. It's like wondering why the increment short* increases the pointer value by 2, and not "how it should be" 1 :)</code></code>
October 3rd 19 at 03:27
I do not understand Your problem? If You write in C++, it is easy just to make your branch of PHP to cut string concatenation and get a interpreted language with the behaviour that You need.

And I'm sure You will find followers and fans to write long-pool applications. And if you add PHP and provide its Threading and finished to a good level OOP shny Runtime, the prices you will not...
IMHO this is not the case, where are the pitfalls to remove easier, than to dig its own channel. And time to create "another darvazica" no. - Margarete.Hal commented on October 3rd 19 at 03:30
1. I recommend to overcome your negative feelings to any information system. Feelings will not help in development (only to interfere) and to spare the community from Your sense of judgment — inherent young, June (I was on "another darvazica"). You surely have noticed that you can write as badly, and having a good experience — not bad (the main thing to understand from where hands grow).

2, a Flaw that is bringing the lowercase types in PHP do to the numerical place to commit mistakes. And multiple comparisons (specifically the == and ===). It is possible to consciously avoid such situations using crutches methods for type conversions (for example, in Joomla has been on the similarity of the methods getInteger, getString, getBoolean, ...)

2. If You need to urgently implement, it is obvious to use the experience of their ancestors. You have been advised of PHP / Ruby / Perl / Python...

3. If you have time, the desire to "dig canals" and confidence in their abilities, then obviously it is necessary to cut the Jedi WEB Framework under C++... I think there are like-minded among large companies (D-Link, ASUS, ...) and now they are doing what they want (I'm talking about CGI scripts in routers)...

4. Again, back to the negative (most likely born after the end of the programmers coming to programming via PHP) to improve PHP. Looks like no love for hex key set (analogy with the tool). Correct then, and not face the gate... - bessie41 commented on October 3rd 19 at 03:33
You certainly are right, and if it(not GameDev) was my main occupation, I would, as I had done for many libraries. The problem is that as practice shows, while the idea didn't come up with famous people, nobody cares(as with reactive programming and me). - Margarete.Hal commented on October 3rd 19 at 03:36
October 3rd 19 at 03:29

If much interesting to write web sites in C and C++

In my projects, I use Apache HTTPD + interesting + modules content module written in C++ (although, from ++ there are only objects with inheritance, no templates, especially stl and boost, object semantics of the structures from C)

Apache HTTPD already has on Board a solid set of useful things (Google Apache Portable Runtime), deficiencies are corrected tons of good and accessible libraries (curl, imagemagick, openssl, anything from the world of C/C++, at least V8 + toc++ to generate bindingof and you have your scriptually javascripta server)

In addition, it is possible to obtain a memory management system from APR (memory pools), which eliminates severe headache with leaks, control of the lifetime resources and other pleasures.

For all this joy we have written a framework that gives to C++ code readability and development speed level interpreted languages, which the team already year wants finished to a full-fledged open Source project (here, only free time... but it looks like it will be in the next life).

The Assembly is built on a makefile, which is wonderful understands any IDE that is to Linux. Build incremental, as expected, compiling with the active work on a feature less than a second. Debugging with GDB (also perceived great IDE). Compile + deploy + run with one shortcut takes less than a second.

Working versions are rolled out via primitive CI (gitolite + hooks), the server collects himself, sets himself. Rolling out the same takes 5 to 10 seconds (on the server, rebuild completely, well, not the last role is assigned).

The web muzzle is going to buttrape (although recently coders tasted SemanticUI and was glad), the heart of a web muzzle - AngularJS.

But what about indexing, I will ask those familiar with SEO people? PhantomJS + a simple script to solve this problem. When it comes to the robot for a complete index of the server of course not very happy, but quite a stand and without noticeable brakes (0.1 MS vs 1.5 MS, with average ping of users in 150мс)

In General, you want to write websites in C is more than real, and sometimes more than efficient. Strong typing and the absence of which is interpreted at Runtime code solve a lot of problems with stability and security. And it's not in the standard level, and approach.

October 3rd 19 at 03:31
1% of the time the power of C++ is used.
99% of the time you are struggling with C++

The man said, developing languages and environments and compilers for almost 40 years.
https://habrahabr.ru/post/314616/

Find more questions by tags PHPC++