76

Re: Application field Golang

Hello, Pzz, you wrote: Pzz>>> In my opinion, in that posting from the Ration blog on which just you gave the reference, this subject is well uncovered. Pzz> it is divided by me. But Pajk - much best writer, than I, therefore let is better he speaks. Ok. Pzz> at me difficult enough network project consisting of a small site, a certain server economy and  which works on the user computer. I solved, as experiment, to study a modern language. Thus the user economy should work on  and  right now, a poppy and mobile devices - in plans of a different level of remoteness. The server economy works on . The server economy is supposed , and user should not guzzle all processor or all storage at normal loading, i.e. efficiency matters. Ok. Thanks.

77

Re: Application field Golang

Hello, Pzz, you wrote: S>> it became somehow not so clear: in your practice the main comparing between a pure C and Go happens? Or all the same between a C ++ and Go? Pzz> With a pure C. At us the pure C merges a C ++ in times. However, we on a pure C do nothing, but there are cases when it is necessary to drag to itself something that has already been made on a C, but with modifications. Or something that has been written on a C ++, but as on a C (i.e. at all "a C with classes").

78

Re: Application field Golang

Hello, so5team, you wrote: Pzz>> With a pure C. S> at us the pure C merges a C ++ in times. However, we on a pure C do nothing, but there are cases when it is necessary to drag to itself something that has already been made on a C, but with modifications. Or something that has been written on a C ++, but as on a C (i.e. at all "a C with classes"). What means, merges?

79

Re: Application field Golang

Hello, Pzz, you wrote: S>> At us the pure C merges a C ++ in times. However, we on a pure C do nothing, but there are cases when it is necessary to drag to itself something that has already been made on a C, but with modifications. Or something that has been written on a C ++, but as on a C (i.e. at all "a C with classes"). Pzz> That means, merges? On volume, clearness and density of errors.

80

Re: Application field Golang

Hello, A13x, you wrote: A>...... Came across the interesting document containing actual arguing generics in Go. Especially interesting the section where consider different implementations generics support seemed.

81

Re: Application field Golang

Hello, D. Mon, you wrote: DM> I do not know, put only in the changed architecture, or Rast so tore With ++, but a difference impressing. Here in the general words start to tell that becomes in new Firefox.

82

Re: Application field Golang

Hello, so5team, you wrote: DM>> I do not know, put only in the changed architecture, or Rast so tore With ++, but a difference impressing. S> here in the general words start to tell that becomes in new Firefox. Well, they and earlier in blogs told about it. The main sensation of smoothness and speed of that discharged principal UI a flow, plus learned operation to scatter on kernels and so to do it hardly faster. A question only in that, how many there merits of Rasta. After all it it also can beat With ++ - not in the linear speed in one flow (there With ++ there is no place to beat almost), and that allows to do competition and a multithreading, without having dug in bugs.

83

Re: Application field Golang

Hello, D. Mon, you wrote: DM> the Question only in that, how many there merits of Rasta. After all it it also can beat With ++ - not in the linear speed in one flow (there With ++ there is no place to beat almost), and that allows to do competition and a multithreading, without having dug in bugs. Those who  changed on Rust, say that singularities Rust simplify it life. However, what contribution to it borrow checker - it is difficult to tell, as it is a question of cumulative effect more often: cargo repeatedly simplifies control of dependences and the project assembly, in standard library it is a lot of that directly "from a box", support of AlgTD (in the form of Rust-ovskih enum), trait instead of templates (restrictions on types are set explicitly, it is much more clear than an error message), is not present traditional OOP, is not present exceptions (type to error handling though there is a sensation that on a panic in Rust it it is not accepted to pay the uniform approach attentions yet), there are more than checks in run-time. Plus to that, on Rust frequently sit on the freshest versions Rust or even on night assembly whereas not all have a possibility to use even a C ++ 11 valuably, not to mention a C ++ 14 and, especially, about a C ++ 17.

84

Re: Application field Golang

85

Re: Application field Golang

Hello, D. Mon, you wrote: DM> It replaces approximately 160,000 lines of a C ++ with 85,000 lines of Rust. AFAIK, here not all so is simple. As a) it is not clear, when this C ++ the code has been written and in what style it has been written, is not eliminated that the fair part of code base has been made still in 90 within the limits of Netscape and early versions Mozilla-ovskogo of the browser. And b) despite that in Mozilla-ovskom a C ++   it is authorized to use features from the modern C ++, a subject not less, such things, as a C ++  exceptions in the code Firefox still under a ban. A consequence of it, for example, is two-phase initialization. That increases and complicates C volume ++  the code. Therefore there are bases to suppose that same 160K lines of an old C ++ could be replaced on 80K lines of the modern C ++. That to advantages Rust in development of the parallel code. Well if it was one of the main counters of language it would be strange, if it, at first, did not work and, secondly, about it would not began to blow at every turn. But generally, the sensation is added that at Mozilla such basis  on a C ++ collected simply that it was easier to rewrite all on something more safe, than to develop and correct that is. Well here it is literally bad shot: class nsHtml5AtomEntry: public nsStringHashKey {public: explicit nsHtml5AtomEntry (KeyTypePointer aStr); nsHtml5AtomEntry (const nsHtml5AtomEntry& aOther); ~nsHtml5AtomEntry (); inline nsAtom* GetAtom () {return mAtom;} private: nsAtom* mAtom;} ; The bare pointer inside which, appears, owning: nsHtml5AtomEntry:: nsHtml5AtomEntry (KeyTypePointer aStr): nsStringHashKey (aStr), mAtom (new nsAtom (nsAtom:: AtomKind:: HTML5Atom, *aStr, 0)) {} nsHtml5AtomEntry:: nsHtml5AtomEntry (const nsHtml5AtomEntry& aOther): nsStringHashKey (aOther), mAtom (nullptr) {NS_NOTREACHED ("nsHtml5AtomTable is broken and tried to copy an entry");} nsHtml5AtomEntry:: ~nsHtml5AtomEntry () {delete mAtom;} Thus, if to look at base types nsStringHashKey and DPLHashTableHdr there anywhere there is no prohibition of the operator and the designer of copying (no less than there is no operator and the designer of relocation). Accordingly, nsHtml5AtomEntry the C ++ is subject classical ache to an error: to double removal at bit-by-bit  copying. Whether it is not clear, actual was specific for nsHtml5AtomEntry or not. But anything of it does not forbid also the compiler to anybody on hands not . Though to get rid of a similar problem it was possible elementarily - would be to make nsHtml5AtomEntry:: mAtom not the bare pointer, and unique_ptr th enough. Upd. The operator of copying, appears, is in most nsHtml5AtomEntry, but it very much is oddly certain. All the same unique_ptr would solve these problems much better. In general how much advantages Rust are actual in case of normal code base and taking into account a C ++ Core Guidelines and analyzers which promise under CCG to let out, it already an individual question.