TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Grumpy Guy Complains About Complaining

48 点作者 martinp超过 11 年前

6 条评论

ekidd超过 11 年前
From the article: <i>This is like finding a new alloy of steel and then building a bridge out of it to see if its any good. If Go doesn’t have generics, and you know you need generics, why the fuck did you bother with Go? These details are widely, exhaustively documented; they are not surprises.</i><p>Well, I took a good hard look at Go, and I said, &quot;There&#x27;s a lot of stuff here that&#x27;s really, really sweet, but error handling is going to require 600 gross conditional statements, and I&#x27;m going to have to rewrite common algorithms over and over and over because there are no generics.&quot;<p>But lots of people in Go community kept saying, &quot;Yes, it looks a little unusual, and it doesn&#x27;t have all the features you&#x27;d expect, but you need to give it a fair chance, and try writing a real project or two in it. Don&#x27;t be a blub programmer, afraid to try out strange new abstractions.&quot;<p>So I wrote a couple of medium-sized programs in Go, including a server which broke simple substitution ciphers (to help perform OCR on subtitles). This involved a lot of tweaking of algorithms and optimizing. This was maybe my second or third medium-sized Go program.<p>And maybe about the third time I had to tear apart the server and rewrite it, and said, &quot;This whole experience is actual incredibly painful. Why does this code keep hurting me every time I need to redesign something?&quot; So I paid closer attention, and I said, &quot;You know, my code is buried under error-handling conditionals and lots of stupid little subroutines that should be in standard library—but which can&#x27;t be there, because there are no generics.&quot;<p>Seriously, if Go had Erlang OTP-style error-handling and some ruthlessly-simplified generics, I would use it all the time. The type system rocks, the basic data structures are excellent, and the standard library is good. It&#x27;s clearly well-optimized for writing certain types of programs. It&#x27;s just I don&#x27;t write those programs very often.<p>It turns out what I want is a lot closer to Elixir: Erlang concurrency semantics, decent Unicode string handling, some light metaprogramming and a Ruby-like syntax. Too bad Elixir is still so young and obscure.
评论 #7044473 未加载
评论 #7044911 未加载
joshuapants超过 11 年前
&gt;I think of these languages, these tools, as something akin to violins and cellos. They’ve been around, virtually unchanged, for several hundreds years. They are an absolutely gigantic pain in the ass to play- they haven’t got any frets, they have tiny fingerboards designed to be played by scrawny, malnourished 15th century musicians. They’ve got tuning pegs designed for strings made out of animal guts and which rely on friction alone to stay in tune. They’re freaking baroque. And yet, they get played a lot. You might argue that their design actually encourages mistakes.<p>I wish people wouldn&#x27;t make analogies about things they don&#x27;t understand. Frets do not make string instruments automatically better, in fact they limit you in terms of intonation and vibrato. The fingerboards are exactly the size they need to be, and would be less ergonomic if they were simply made wider (every attempt at an ergonomic violin I&#x27;ve seen has involved changing the body shape to make it easier to hold, not widening the neck. Widening the neck substantially on a bass would just be completely unhelpful) and a lot harder to bow. Friction pegs were certainly designed for gut strings, and that&#x27;s why you&#x27;ll find geared tuners on many instruments that use steel strings (and sometimes even on ones that use guts).<p>I just find it funny that he doesn&#x27;t like it when people who don&#x27;t understand Go try to criticize it, and then criticizes something he doesn&#x27;t understand in an effort to strengthen his argument.
评论 #7046590 未加载
评论 #7045113 未加载
评论 #7044850 未加载
评论 #7044970 未加载
bcaffrey超过 11 年前
Yes, because everyone knows the full requirements for a project up front. That&#x27;s why we all still use waterfall, right?
nakkiel超过 11 年前
Hum wow. So there&#x27;s at least one guy on the internet trying to make sense. And the pop-software culture thing also had to be coined.
norswap超过 11 年前
The problem with Go it that it is fundamentally non-exciting. It brings very little to the table, when compared to C.<p>On the top of my head: - GC (which some people find to be actually a cons) - Some more modern ammenities for debugging. - Coroutines (this is really where go shines)<p>On many other fronts, Go is actually a regression from C, because it favors being &quot;safe&quot; over being expressive. Goodbye macro, pointer arithmetic, etc.<p>Omitting exceptions is a moronic decision. In a program that does its fair share of I&#x2F;O, this means that error checking will end up taking a huge % of the code written (easily 30%). It will naturally push people to either eschew error checking, or to write huge methods to dilute the error checking code.<p>So in the end, I&#x27;ll use C with a coroutine library. It&#x27;ll feel (and be) more hackish, but I&#x27;ll be more productive and my code will be easier to understand.<p>Now, that&#x27;s my opinion. Maybe other people have different sensibilities and Go is just fine for them. But I think it&#x27;s pretty obvious that Go is not right for a lot of people, and nothing&#x27;s wrong with them. It&#x27;s unfair to pretend they haven&#x27;t a point. Go is not for everyone.
评论 #7046333 未加载
Dewie超过 11 年前
&gt; So here we find ourselves in a world with various better choices than C and C++, yet they still get used for a pretty significant chunk of all the coding that goes on in the world. Why is this?<p>Isn&#x27;t the emergence of relatively many system programming languages in recent years partly a reaction to there indeed <i>not</i> being many viable choices? I mean, I guess you have all the languages that are C-level (or Go-level) that were simply out-competed by C in the mainstream software world for whatever reasons, but people don&#x27;t seem willing to go and program in languages like Ada and seeing if it&#x27;s a better fit (or at least I haven&#x27;t heard much of it). It seems more like, &quot;every other decently mainstream language has mandatory garbage collection → therefore C&#x2F;C++&quot;.