<p>First found via <a href="https://developers.slashdot.org/story/17/11/27/039226/why-esr-hates-c-respects-java-and-thinks-go-but-not-rust-will-replace-c">Slashdot</a> </p>
<p>Open source guru Eric S. Raymond followed up his post on <a href="http://esr.ibiblio.org/?p=7711">alternatives to C</a> by explaining why he won't touch C++ any more, calling the story "a launch point for a disquisition on the economics of computer-language design, why some truly unfortunate choices got made and baked into our infrastructure, and how we're probably going to fix them."</p>
<blockquote>
<p>My problem with [C++] is that <a href="http://esr.ibiblio.org/?p=7724">it piles complexity on complexity upon chrome upon gingerbread</a> in an attempt to address problems that cannot actually be solved because the foundational abstractions are leaky. It's all very well to say "well, don't do that" about things like bare pointers, and for small-scale single-developer projects (like my eqn upgrade) it is realistic to expect the discipline can be enforced. Not so on projects with larger scale or multiple devs at varying skill levels (the case I normally deal with)... C is flawed, but it does have one immensely valuable property that C++ didn't keep -- if you can mentally model the hardware it's running on, you can easily see all the way down. If C++ had actually eliminated C's flaws (that is, been type-safe and memory-safe) giving away that transparency might be a trade worth making. As it is, nope.</p>
</blockquote>
<p>He calls Java a better attempt at fixing C's leaky abstractions, but believes it "left a huge hole in the options for systems programming that wouldn't be properly addressed for another 15 years, until Rust and Go." He delves into a history of programming languages, touching on Lisp, Python, and programmer-centric languages (versus machine-centric languages), identifying one of the biggest differentiators as "the presence or absence of automatic memory management." Falling machine-resource costs led to the rise of scripting languages and Node.js, but Raymond still sees Rust and Go as a response to the increasing scale of projects. </p>
<blockquote>
<p>Eventually we will have garbage collection techniques with low enough latency overhead to be usable in kernels and low-level firmware, and those will ship in language implementations. Those are the languages that will truly end C's long reign. There are broad hints in the working papers from the Go development group that they're headed in this direction... Sorry, Rustaceans -- you've got a plausible future in kernels and deep firmware, but too many strikes against you to beat Go over most of C's range. No garbage collection, plus Rust is a harder transition from C because of the borrow checker, plus the standardized part of the API is still seriously incomplete (where's my select(2), again?). </p>
<p>The only consolation you get, if it is one, is that the C++ fans are screwed worse than you are. At least Rust has a real prospect of dramatically lowering downstream defect rates relative to C anywhere it's not crowded out by Go; C++ doesn't have that.</p>
</blockquote>
<hr/>**评论:**<br/><br/>throwlikepollock: <pre><p>Imo, no GC is a massive selling feature of Rust. With that said, I don't think Go or Rust is the final <em>("final" lol)</em> replacement. I think something that uses ideas of Rust, namely safety via something like borrow checking but with the ease of Go, will be the "C killer".</p>
<p>This may be a pipe dream; it may be impossible to make a friendlier Rust; but they have the right idea, and so does Go. Simplicity and safety are two killer, killer features. Focus more on your programs, let the language carry you. Both languages have that in common. They're just not perfect yet.</p></pre>jerf: <pre><p>If there is a way to make something as safe as Rust but as easy as Go, nobody has any idea what it looks like at any level, from syntax to implementation. To my eye, Rust's safety is <em>intrinsically</em> drawn from the greater amount of effort you put into the code it creates. You can become skilled in Rust and it will become easier for you over time, but it can never be as easy as writing the same code, only without any safety annotations.</p>
<p>Some code can only be written with that much care; I wouldn't dream of implementing a browser in Go. But there's also a <em>looooot</em> of code out there in the world for which Rust is ultimately overkill. Perhaps a true Rust master can write Rust so well that the costs are minimal (no sarcasm), but in general you can't count on populating a non-trivially-sized team with nothing but such people.</p></pre>throwlikepollock: <pre><blockquote>
<p>To my eye, Rust's safety is intrinsically drawn from the greater amount of effort you put into the code it creates. You can become skilled in Rust and it will become easier for you over time, but it can never be as easy as writing the same code, only without any safety annotations.</p>
</blockquote>
<p>Agreed, and I don't think this theoretical language I proposed would be <em>as safe as Rust</em>. I think, just like Go, it would make the right compromises.</p>
<p>Because that's why we love Go, right? Not because it's the easiest language, but because it has made good choices with good compromises in a lot of areas. Not perfectly, but many good. I'd love to see this extended into memory safety, so you could have a language as great as Go, as easy as Go, with far less ability to shoot yourself in the foot.</p>
<p>I mean hell, Go defaults to a panic in many areas - Eg, <code>fmt.Println(someMap["foo"])</code> is an easy pitfall for beginners, the language basically points the gun downwards to shoot your foot. Safety <strong>and</strong> convenience would be a really nice feature set in a language - I'd kill for it in Go 2 :)</p>
<p>So to summarize, I'm not proposing that this hypothetical language could be everything, but it definitely can extend on what both Go and Rust have already made great strides towards.</p></pre>nevyn: <pre><blockquote>
<p>I mean hell, Go defaults to a panic in many areas - Eg, fmt.Println(someMap["foo"])</p>
</blockquote>
<p>I must be missing something obvious, how does this panic?</p>
<p><a href="https://play.golang.org/p/pA5gyF5GRa">https://play.golang.org/p/pA5gyF5GRa</a></p></pre>nishanths: <pre><p>It can't. OP likely meant a write to a nil map.</p>
<p>In fact, it looks like fmt.Println has safeguards against panicking. The documentation says:</p>
<blockquote>
<p>If an Error or String method triggers a panic when called by a print routine, the fmt package reformats the error message from the panic, decorating it with an indication that it came through the fmt package.</p>
</blockquote></pre>qaisjp: <pre><p>That's for if you pass a random object that has the String() method. If String() panics then println will NOT.</p>
<p>There's no protection against <code>println(o.String())</code>, only <code>println(o)</code></p></pre>nishanths: <pre><p>Correct!</p>
<p>But that’s not special to <code>fmt.Println</code>. The program would panic evaluating <code>o.String()</code> before <code>fmt.Println</code> is even called. Calling<code>foo(o.String())</code>, for some arbitrary function foo, would panic as well. </p>
<p>But <em>once</em> fmt.Println has been called after successfully evaluating the arguments, it won’t panic. </p></pre>qaisjp: <pre><p>Yup :) </p></pre>puffybunion: <pre><p>What he says makes sense. That said, I doubt C and C++ will ever be completely replaced... Although Go for sure has been exploding in popularity and it's still very early. Hey, it's a great language...</p></pre>earthboundkid: <pre><p>ESR hasn’t done anything useful in the last twenty years. It’s interesting to read an opinion but he has no particular authority on anything. </p></pre>daishi-tech: <pre><p>Actually it looks like he's still <a href="https://gitlab.com/esr">pretty active</a>. He has ~40 contributions to NTPSec on a sunday. </p>
<p>Edit: I feel like some people probably confuse him with Richard Stallman who is a bit more...eccentric.</p></pre>ghms: <pre><p>His work during the last decade was incredibly important to basically anything that has a GPS in it. You know that, right? Also, he has been doing an amazing work with some open source repositories (fixing and upgrading to other version managers). </p>
<p>Man, nobody respect people who do griding work...</p></pre>eattherichnow: <pre><blockquote>
<p>Man, nobody respect people who do griding work...</p>
</blockquote>
<p>He put in a <em>lot</em> of work to stop people from respecting him, tbh.</p></pre>arp242: <pre><blockquote>
<p>ESR hasn’t done anything useful in the last twenty years. It’s interesting to read an opinion but he has no particular authority on anything.</p>
</blockquote>
<p>So? He's just a someone with an opinion, like you and me, and most folk posting here. Agree with him, or disagree with him, but "hasn’t done anything useful" and "has no particular authority" are kind of lame criticisms, even if it would be true.</p>
<p>I personally thought that The Art of Unix Programming was a pretty good book, by the way.</p></pre>RustyCrustyBoy: <pre><blockquote>
<p>So? He's just a someone with an opinion, like you and me</p>
</blockquote>
<p>Nobody would post something like "Why <a href="/u/arp242" rel="nofollow">/u/arp242</a> hates X and respects Y..." here though. That's an appeal to authority. That's why I wouldn't consider "has no particular authority" a lame answer here.</p></pre>kostix: <pre><p>I'd also note that many of us had, at some point, been greatly inspired by his writings like "The Cathedral and the Bazaar", and the Hacker's Jargon Dictionary.</p>
<p>I, for one, do not agree with ESR on many of the points he had made over time, but I respect him nonetheless.</p></pre>carbine1950: <pre><p>Who cares what ESR thinks about programming languages? <a href="https://www.theregister.co.uk/2015/11/06/linus_torvalds_targeted_by_honeytraps_says_eric_raymond/" rel="nofollow">He claims that women-in-tech groups are trying to falsely accuse male open source leaders of rape.</a></p></pre>Killing_Spark: <pre><p>Just because he may be (i havent looked into the matter) an patriarchist or what ever, he may still have valid opinions on programming languages, these things are completly unrelated... </p></pre>daishi-tech: <pre><p>I don't support that there is some black helicopter conspiracy against open source leaders but that doesn't mean that there aren't some feminists that seem to be looking for an excuse to <a href="http://knowyourmeme.com/memes/events/donglegate-adria-richards" rel="nofollow">ruin people's careers</a> in the name of making an example out of people.</p>
<p>I'll say that I'm super careful about how I joke with female coworkers because if one of them took it the wrong way just once it would be the end of my job and it would haunt my career so it's something I'm fairly cautious about.</p>
<p>That's not to say I exclude women I'm just 100% professional in my behavior towards them in the workplace. I don't discuss clothing, appearances, and rarely bring up anything personal/social. I'm very open on the topics of careers/work/projects but my interactions with female coworkers are admittedly very calculated. Some of them probably see me more of a...helpful robot and less of a human but years of sexual harassment and EO training, horror stories, and an aversion to risk have lead to perhaps an over abundance of caution on my part.</p>
<p>If I do drop the ball though not only will I get roasted but rather than my lapses in judgement be seen as an individual act the blame will fall on a "hostile culture" towards women at my company and it will be viewed as a "problem of too many white and asian males". As a white male in tech I understand that my actions aren't simply viewed as the actions of an individual but blame for my behavior will be placed at the feet of other probably innocent people who look like I do and the move to blame those innocent people for my actions will be viewed as "progress" by many. </p>
<p>That's far too large a burden to take risks with. If a female coworker wants to talk about work great but if she needs a companion she can buy a dog.</p></pre>keef_hernandez: <pre><blockquote>
<p>aren’t simply viewed as the actions of an individual </p>
</blockquote>
<p>Way off topic but the irony is too thick to ignore. You realize that this is the experience of every minority in daily life dont you? Try being a black male in tech, or in college or at the park or at the local bar. Hell a pickup softball game even. Your every action must be above reproach. </p>
<p>Heck, things have dramatically improved in the last few years but the stuff I’ve seen female colleagues have to deal with as developers is truly shameful. </p></pre>natefinch: <pre><p>This is a great perspective that I hadn't thought of. Thank you for your insight.</p></pre>daishi-tech: <pre><blockquote>
<p>Way off topic but the irony is too thick to ignore. You realize that this is the experience of every minority in daily life dont you?</p>
</blockquote>
<p>I don't think I'm saying stereotyping of women and AA's doesn't happen, of course it does. The difference between it is when Roy Price from Amazon LA studio sexually harasses a woman you see articles like this one:</p>
<blockquote>
<p><a href="https://www.recode.net/2017/10/21/16512448/amazon-gender-diversity-leadership-executives-jeff-bezos" rel="nofollow">It's 2017 and Amazon only has one woman among its 18 most powerful executives</a></p>
</blockquote>
<p>quote</p>
<blockquote>
<p>as Amazon deals with the aftermath of a sexual harassment scandal involving its now-former studio head Roy Price, new questions are being raised internally about how the company can justify having so few women in top leadership programs.</p>
</blockquote>
<p>With articles like that journalists openly take an individual act by one employee and paint the rest of the men in the organization with that brush.</p>
<p>I think the difference is if a person of color did something at a company if a journalist published an article that said "It's because he's black and they should limit hiring more black people if they don't want this result" it would be considered hate speech and it would be their last day of employment.</p>
<p>I don't care if Amazon has mostly male execs or not it's not fair to lay the blame of Roy Price's actions at the feet of the other men that work there because they happen to also be male.</p>
<p>It's not as though Roy Price came to them and said "Is it cool if I sexually harass women?" and they were like "Sure, lets take a vote on it, looks like the majority of us are men so by extension we are cool with your harassing behavior"</p>
<p>Tech is seen as having a "boys club" culture and the implication of such is that things like sexual harassment is acceptable behavior? That's funny because I don't remember being involved nor signing a permission slip for the behavior. I don't think it's fair to for me to be painted with the same brush simply because of my gender. </p>
<p>So yes of course stereotyping exists for women and PoC but the difference is doing so isn't openly considered acceptable and even encouraged as it is when a white male does something. </p>
<p>To leave you with another point take the definition of political correctness from the oxford english dictionary:</p>
<blockquote>
<p>The avoidance of forms of expression or action that are perceived to exclude, marginalize, or insult <strong>groups of people who are socially disadvantaged or discriminated against</strong>.</p>
</blockquote>
<p>So it's easy to discard my views as paranoid rambling but there is an exception in the <strong>dictionary</strong> permitting such behavior to be carried out against people who are not considered disadvantaged. </p>
<p>And of course "people who are not considered disadvantaged" has nothing to do with my upbringing or history in this world but rather it's based on my skin color and gender. </p>
<p>Rather than a blanket rule against racism and sexism there are exceptions made when that person isn't considered a member of a disadvantaged group. I'm not saying that racism and sexism towards others doesn't exist and isn't also a problem I'm simply pointing out that when it happens it isn't openly considered acceptable.</p></pre>gbrlsnchs: <pre><p>Such a paranoid story. Out of debt, out of danger. Risky jokes are not a needed thing for working, dude. It sounded like you dig mocking female coworkers and can't live without it.</p></pre>Killing_Spark: <pre><p>Not necessarly. There have been horror stories of people beeing fired for really normal behaviour. If he feels like this is a real danger for him, this is not really sonething he could be blamed for </p>
<p>Edit: emphasize stories, i do not know if any of these are true. </p></pre>natefinch: <pre><p>A lot of what many men consider "normal" behavior is actually horrible and should be stopped. I'd bet that nobody has ever been fired for saying "hey like the new haircut!". They get fired because they're skeevy men that make every woman within 150' feel uncomfortable because of their actions.</p>
<p>It's really not hard to treat women with respect.</p></pre>daishi-tech: <pre><p>To give some personal justification for my caution:<br/>
1) one example I have is from like middle school. There was a girl who sat next to the table my friends and I sat at that we sometimes joked with. One day her older brother who was a senior came into the lunchroom and told my friends and I to leave his sister alone.</p>
<p>She generally participated in the dialogue/banter and gave no indication (that I noticed) that she felt we were being harsh with her. If she or anyone sitting with her would have provided a hint I picked up on that our joking made her feel bad I would have stopped but I was largely blindsided by her brother showing up to yell at us. The truth is just because she participated in the joking and didn't give an indication that she was uncomfortable with it doesn't mean it didn't make her uncomfortable. To your point my friends are sometimes brutes who are sometimes harsh with each other and it's easy for a girl/woman to be uncomfortable with being treated as "one of the guys" because we sometimes give each other a lot of shit.</p>
<p>2) I once made a really benign comment/joke to a woman I work with that she didn't get. She took it as a comment about her eating/weight because she (apparently) had recently gained weight and was really defensive/insecure about it. She wasn't overweight at all and I hadn't noticed her weight gain (nor would I have cared). It was a fairly common reference I would have expected most people to catch (and this was explained to her by co workers that weren't me) but the fact is she took something I said out of context and it made her uncomfortable and how she felt in the situation is what mattered. She isn't someone I work with regularly.</p>
<p>3) Not related to gender but we hired an african american employee for a position that he was qualified for on paper who ended up being probably the least talented person I've ever worked with. Being conscious of his race I was extraordinarily careful not to give him that title on a first impression without several chances for him to establish a better opinion. I gave him about 5x as many chances as I would have given to any other employee before deciding he just didn't have what the position required and didn't appear to be improving or trying to improve in it. I was among the first from my office to work with him but rather than express my opinion of him to coworkers I held it in allowing them to each form their own independent opinions of him after which they all reached the same conclusion. </p>
<p>He worked remotely in a different office and he came up in conversation I had with an employee from his office (from another department) who said the employee had described the people in my office as racist for their negative views of him. I don't think I could have possibly been any more fair in how I formed my opinion of him but that didn't stop him from making the accusation of racism towards myself and my coworkers.</p>
<p>I have a good work ethic and a family to support and accusations like that end careers. The same employee had a manager that decided to start paperwork on his poor work with HR and essentially got in trouble for trying. The manager was told that he was to blame for not being able to successfully manage the employee despite the fact that it was his 2nd or 3rd manager in the company and the results with each were the same. </p>
<p>Being accused of racism/sexism in the corporate world is a curse because even if the accusation is documented as having no merit if another employee comes along and makes the same accusation now it's a pattern.</p>
<p>Given the importance of my career to support my family I don't feel that my abundance of caution with these things is unwarranted. The fact is that even being cautious these types of accusations pose one of the largest risks to my job and career and by extension the wellbeing of my family. </p></pre>Killing_Spark: <pre><p>It is indeed not hard. But the whole topic has gotten pretty toxic by overly sensitive people, making it worrying for some men. </p></pre>ghms: <pre><p>whoa, this kind of when off topic, but whatever. </p>
<blockquote>
<p>I don't discuss clothing, appearances, and rarely bring up anything personal/social.</p>
</blockquote>
<p>This isn't a thing that you aren't suppose to enter with women, IMHO this is something that everyone aren't supposed to enter with ANYONE at work. Work is work, keep it profession. I restrict my non-professional relations with coworkers of any gender/orientation/[put all other labels here] to a point that I don't do happy hours with them, nor any other event really, apart for the annual get together, when I'm actually more focused in eating the free BBQ than speaking with people at all. MAYBE comment about an specific client that created an funny story, but that's it. </p></pre>sxan: <pre><p>Exactly. I mean, these are only people you spend just under a third of your life with - make sure you don't interact with them socially. Make extra sure you don't go to holiday parties, or any other off-work social events. Stay away from company sponsored volunteer efforts, too - you may find yourself in a situation where you may be inclined to talk about non-work topics.</p></pre>ghms: <pre><p>Yeah, basically, yes. It worked out for me great for many years. </p>
<p>Being clear that I'm not rude nor "dry" when speaking to anyone. If someone feel comfortable with sharing things with me, I'll not judge them. I however, refrain from doing so, doing only when necessary, like "family member is sick, will have to be absent for some time to take care of that."</p>
<p>This is the same reason I don't have facebook, twitter, and other social networks where people usually overshare personal info.</p></pre>ghms: <pre><p><a href="/u/carbine1950">/u/carbine1950</a>, this is basically the same as saying that Steve Jobs wasn't a smart and competent CEO because he was a shitty father to her daughter in her first years...</p>
<p>A person CAN be incredibly good at something and have a valid opinion on the matter AND be an asshole in other areas of his life. You know that, right? </p></pre>carbine1950: <pre><blockquote>
<p>A person CAN be incredibly good at something and have a valid opinion on the matter AND be an asshole in other areas of his life. You know that, right?</p>
</blockquote>
<p>I'm not saying his opinions on programming languages are wrong because he's a bad person. I'm saying sometimes people do things so bad that they should be socially ostracized.</p>
<p>For example, I'm sure Harvey Weinstein is still a very capable movie producer.</p></pre>ghms: <pre><blockquote>
<p>I'm saying sometimes people do things so bad that they should be socially ostracized.</p>
</blockquote>
<p>That's something for the legal system to determine, not us. Even if the legal system fail to achieve a verdict we determine to be correct, we still shouldn't ostracized someone in their field, we should use democratic means to pressure the gov. to review their decision.</p></pre>metamatic: <pre><p>I refuse to outsource my moral judgements to the legal system. I'm going to carry on assuming Bill Cosby is guilty, for instance.</p></pre>daishi-tech: <pre><blockquote>
<p>I refuse to outsource my moral judgements to the legal system</p>
</blockquote>
<p>I can agree with this part mostly but there is a pretty big difference between the actions of Harvey Weinstein and Bill Cosby and someone who's overly paranoid about someone falsely accusing them of wrongdoing. If you paint them with the same brush it might be best to outsource your moral judgements to the legal system instead. </p></pre>metamatic: <pre><p>It's not ESR's paranoia that makes people ostracize him.</p></pre>ghms: <pre><p>What is it then? Because from what I saw so far, he is a damm good C coder (just take a look on his GPS module code for instance), who works alone and don't care about exposing his opinions on his own blog (like so many professionals everywhere this days).</p>
<p>The problem with his opinions is that a lot of people disagree with them, but if that is the point, well don't hire him as an opinion writer or journalist, keep it as a C coder.</p></pre>metamatic: <pre><p>Get to know some female hackers in the circles he moves in and you'll hear the stories about what people object to. They're not my stories to tell.</p></pre>kostix: <pre><p>So what are your proofs his claims are false?</p>
<p>Otherwise it's no more than claims someone else's claims are unfounded.</p></pre>334efv34: <pre><p>Not a single mention of Ada which has great concurrency support and actually has real time programming, something go doesn't. Go has a great std lib though, Rust does not, all though the latter is better at package management. </p></pre>Sythe2o0: <pre><p>None of the languages discussed in depth have real time programming, so it seems that's a feature ESR doesn't think is critical.</p></pre>kostix: <pre><p>The "problem" is that the term "real time" as stated
is almost meaningless as there exist at least "soft real-time"
and "hard real-time" sets of constraints, and they are vastly
different.</p>
<p>I'd say that with careful programming, today's Go is pretty much
okay for soft real-time situations if one's measurements show that
for their workloads the sub-20µs pauses of the Go's GC are acceptable.</p></pre>Sythe2o0: <pre><p>You're right, I was misinterpreting the person I responded to as referring to, essentially, having a REPL or being able to hotswap code. I didn't connect real time programming == real time computing</p></pre>kostix: <pre><p>May I ask you to elaborate specifically on the point</p>
<blockquote>
<p>Ada … has great concurrency support</p>
</blockquote>
<p>?</p>
<p>I did a search on a popular Internet search engine and the closest thing on concurrency in Ada I was able to find was
<a href="https://en.wikibooks.org/wiki/Ada_Style_Guide/Concurrency" rel="nofollow">this piece on Wikibooks</a>.
Unfortunately, it appears to only deal with a very high-level concepts — "protected objects" and "tasks" — but fails to touch
on topics which are of interest to professionals — as opposed to
students.</p>
<p>What I mean, is that Go is not just about "CSP paradigms" —
it's rather about pretty concrete implementation of them
(for instance, accessibly documented
<a href="https://morsmachine.dk/go-scheduler" rel="nofollow">here</a>
and <a href="https://rakyll.org/scheduler/" rel="nofollow">here</a>).</p>
<p>Knowing how exactly the concurrency is implemented
is paramount for doing real work in real production environments.</p>
<p>So, let's suppose I'm about to consider writing a reasonably
high-loaded networked server in Ada; the software is to be deployed on a pretty de-facto standard Linux/amd64.
Where can I read about which sort of concurrency I can expect
from Ada on that platform?
What should be my expectation regarding performance?</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传