Unfortunately, the author seems to have misconceptions about a variety of things. > projects with more than 10k LOC. Other comments have discussed this. Linux kernel: ~4million lines. Compilers, interpreters, and so on... all well above 10k LOC. While C is not the best language for such things, by no means is it unmanageable. > But when you try to do the modern funkiness of dynamic languages (lambda functions, map/re…
The Go Programming Language, or: Why all C-like languages except one suck.
91–100 of 110 posts
Re: The Go Programming Language, or: Why all C-like languages except one suck.
#92Earlier quoted context omitted.
Go doesn't lack exceptions. It just uses some different names (throw -> panic, catch -> recover) and uses a different way to write the code that catches them. http://golang.org/doc/go_spec.html#Handling_panics Edit: Also, here's an interesting pattern to illustrate that Go's panics are a little different. func parse(s string, config *Config) (x Thing, err error) { defer config.RecoveryPlan(&x, &err) x, err = doParse(…
Oh, I know about this already. Trouble is, panics aren't supposed to cross module boundaries. "The convention in the Go libraries is that even when a package uses panic internally, its external API still presents explicit error return values" http://blog.golang.org/2010/08/defer-panic-and-recover.html But crossing interfaces between modules is, IMO, core to exceptions. They're ideally suited to communicating the unde…
Re: The Go Programming Language, or: Why all C-like languages except one suck.
#93> Go has no exceptions. I'm not a fan of the verbosity of error handling with exceptions either. It is particularly bad for fine grained error handling. However, I do like that the default state of a non-handled error is to propagate and eventually crash the thing rather than continue with errors that may subtly corrupt things. I haven't used Go, but from the explanation of error handling Go seems to do the latter ra…
Re: The Go Programming Language, or: Why all C-like languages except one suck.
#94Earlier quoted context omitted.
I know who Ken Thompson is, and don't so much disagree. But that is a bold and oft-repeated statement, that seems to not be fully supported by the evidence.
I'll concede that the former project lead for Unix might not be the best C programmer. But then; who is? If there's evidence to support that there's someone who knows it better than Ken, I personally would like to see it. (More from curiosity than anything else.)
Frankly, even if Unix was that project, I'd expect that the "best" C programmer may actually be someone who is in a much visible position.
Then again, Ken may very well be the best C programmer, but Go doesn't much seem like a language designed to address the issues that C is currently being used to address. Frankly, it seems like a much better Java replacement IMO.
Re: The Go Programming Language, or: Why all C-like languages except one suck.
#95Earlier quoted context omitted.
Some of the implementations in JS went wrong, but fundamentally it really doesn't have anything horrible going on for what it's meant to do. Unfortunately some of the implementation details do allow for seriously horrible code and some seriously horrible traps. But if you can clear the fog, and use "the good parts", it's actually pretty nice. As for the article, I think it's very well written and seems to have a good…
I am not talking about any APIs in JS or any "implentation in JS". JS, the language, as specified, is wrong at the core. It has a lot of insensible semantics. It's not even at a local maximum. I could just write a list of 10 changes to the language right now that would spur near-unanimous agreement of benefit with no downside.
Re: The Go Programming Language, or: Why all C-like languages except one suck.
#96If C isn't suitable for projects with more than 10K lines, then praytell, what language should my kernel be written in? I've been meaning to try Go for a while (the fast compile times alone intrigued me), but this type of post really just puts me off - if you're telling me that C isn't suitable for large projects, then that tells me you may not know C well enough to make that judgement.
Re: The Go Programming Language, or: Why all C-like languages except one suck.
#97Just from the title I can tell this is going to present a completely objective, well thought-out, unbiased appraisal.
This is Hacker News. You have to have a conclusion or command in your title to get upvotes. "Why the cloud is wrong for your business." "Why your language sucks." "SaaS-de-jour, we have a problem."
Re: The Go Programming Language, or: Why all C-like languages except one suck.
#98Earlier quoted context omitted.
I am not talking about any APIs in JS or any "implentation in JS". JS, the language, as specified, is wrong at the core. It has a lot of insensible semantics. It's not even at a local maximum. I could just write a list of 10 changes to the language right now that would spur near-unanimous agreement of benefit with no downside.
Go for it.
Re: The Go Programming Language, or: Why all C-like languages except one suck.
#99Just from the title I can tell this is going to present a completely objective, well thought-out, unbiased appraisal.
Though you seem to be concerned about such kind of material being posted on HN. At first I was inclined to agree that it doesn't belong here. Yet consider, there's probably a lot of opinionated articles that include a fair bit of useful information (knowing others' opinion might be useful by itself), while bias can be neutralized by critical thinking, which HN audience hopefully is capable of.
And I'd argue that on HN relatively many articles get to the front page even without sensational headlines.
Re: The Go Programming Language, or: Why all C-like languages except one suck.
#100Earlier quoted context omitted.
For that matter, libc is considerably more than 10 kLOC (on FreeBSD 9.0, it's about 140 kLOC), and it's hard to think of a more stereotypical block of C code than that.
It is stereotypical library but not stereotypical software project per se. Functions in libc have (by design) very strict interface and little data interdependency. I would say SQL or HTTP server or game or a word processor where you have to retain sizable chunks of data in memory for longer periods is a better example of big C project. And that's where lack of automatic memory management and data abstraction in C ma…