Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
usrbinbash
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
421.
▲
by
usrbinbash
3y ago
> it's too easy to forget an error check. How? What exactly makes this "too easy"? In regards to a functions error returns, there are exactly two things a caller can do func foo() (int, error) { //
422.
▲
by
usrbinbash
3y ago
> The key is to surface errors in compiler diagnostics, so that the newbie coders know when they're getting it wrong. That "key" is making Rust the complexity issue it is. Which is why it is considered so hard to pick up,
423.
▲
by
usrbinbash
3y ago
> If the car breaks down, the driver still has several options: The one option he doesn't have though: Continue running the car as-is. And that's the point I am making. > and a programming language that purposely allows a li
424.
▲
by
usrbinbash
3y ago
> The package-name is just a unique name; the only thing it refers to is the package. Not quite. In go, you import 3rd party packages via a URL where a VCS can find them, eg.: import "github.com/gorilla/websocket&quo
425.
▲
by
usrbinbash
3y ago
That's true, but Go's backwards compatibility is a side-effect of another design goal, one that many contemporary languages do not share: Keeping the language small and stable, and actively trying not to add shiny new features.
426.
▲
by
usrbinbash
3y ago
> It communicates hostility and disbelief rather than curiosity. To me, it just asks for examples. I guess that's a matter of opinion then. > https://github.com/golang/go/issues/60078 is where thi
427.
▲
by
usrbinbash
3y ago
> What a terrible comment. How is asking for examples for a statement a "terrible comment"? >go is changing the loop semantics to scope loop variables to the loop. Now, I like and agree with this change, but it is a breaking
428.
▲
by
usrbinbash
3y ago
> What if Google goes under? Then Go is still an Open Source Project with massive community support, that everyoen is free to form and extend or maintain by himself. > What makes you so convinced "someone" will take over? Be
429.
▲
by
usrbinbash
3y ago
> Not at all. Python 3.7 and older cannot be even built on current Linux + GCC. They can still be built in a suitable build environment (which is easy eg. with a container, and it is trivially easy to install a python 3.7 environment on
430.
▲
by
usrbinbash
3y ago
> it's enthusiasts feel compelled to promote it to help it grow faster. I have no problem with language-fans promoting it and singing praise to it. I do the same with languages I happen to like. What I do have a problem with, is eva
431.
▲
by
usrbinbash
3y ago
>There's a lot of misinformation, bad arguments and bad conclusions in this post. Let's pick it apart. No, there really isn't, but I had fun answering :-) > But, past isn't a guarantee of the future. It was stable
432.
▲
by
usrbinbash
3y ago
> just want you to either do what I asked you to do or fail gracefully And most of the time, this is EXACTLY what happens. In fact most libraries that do use panics, recover them internally and return errors to the callers. Again: pani
433.
▲
by
usrbinbash
3y ago
> A quick google turns up https://go.dev/blog/defer-panic-and-recover , which says: And another quick googling turns up this: https://github.com/golang/go/issues/26799 which says:
434.
▲
by
usrbinbash
3y ago
> However, Rust has better syntax Better by what metric? > more syntax sugar More features and syntactic concepts don't make a language easier to learn.
435.
▲
by
usrbinbash
3y ago
> In practice though In practice though, there is a reason why Go is seeing continuous growth in usage, so I kinda doubt that these features of Go are subjective. > But other modern languages like Rust or even Swift are quite a bit be
436.
▲
by
usrbinbash
3y ago
> Throw an error and move on with your life No, absolutely not! Panics are the result of conditions that absolutely should crash the program! They are not errors, they are not similar to exceptions, they are conditions that should not
437.
▲
by
usrbinbash
3y ago
> To make things worse, How is a panic crashing a program a bad thing? Panics are not Exceptions. They usually are the result of something happening that should crash the program.
438.
▲
by
usrbinbash
3y ago
I'm certainly not gonna defend Python here, but... >But then you have to keep old interpreter installed ...thanks to `pyenv` that really is a solved problem, even outside containerized environments.
439.
▲
by
usrbinbash
3y ago
> all the "oh so clever" stuff you can do in Python. Oh come on, who doesn't love to see something like this? [print("fizzbuzz" if not x % 15 else "buzz" if not x % 5 else "fizz" if not
440.
▲
by
usrbinbash
3y ago
"There are only two kinds of languages: the ones people complain about and the ones nobody uses." ― Bjarne Stroustrup, The C++ Programming Language
441.
▲
by
usrbinbash
3y ago
Go was created to solve the problem of how to write real world code solving practical problems in the space of backends, systems (not system) programming and microservices, where performance matters, with a language that is easy to learn, t
442.
▲
by
usrbinbash
3y ago
> On the other hand, would you choose to build a long-term business on top of Go a) Absolutely and b) already done. Go is stable. The language is battle tested. It works as advertised. It is open source. Even if google pulled all funding
443.
▲
by
usrbinbash
3y ago
> It sounds like you’re more interested in trains than solutions to global warming. No, it really doesn't sound like that. Trains, and other public transport vehicles, in comparison to the damage that individual traffic does, ARE a
444.
▲
by
usrbinbash
3y ago
> Honest question: doesn’t the factor of individual freedom to move anywhere you want any time you want have any weight in this matter for you? Let's get the obvious out of the way first: Does it matter more than keeping our habitat
445.
▲
by
usrbinbash
3y ago
> What do you think of the argument... I think that a single train can hold over 1000 people, and requires much less energy, not to mention space, materials, infrastructure and maintenance, than hundreds of individual cars in which these
446.
▲
by
usrbinbash
3y ago
> yet many want to just kill it off. That's not because we take what cars can do for granted, it's because individual traffic is a major contributor to the mechanism that is actively killing our habitat. That isn't an opin
447.
▲
by
usrbinbash
3y ago
> it requires considerable knowledge and experience to stay within the bounds of 'predictable' No it really doesn't. Initialize all variables, always check boundaries and free memory when you're done with it. That abo
448.
▲
by
usrbinbash
3y ago
> It's even easier to use than C No, it isn't, by any metric. I personally know people who learned C in a week. I learned all basics of the language in 2 weeks as a teenager, with nothing but K&R as learning materials. If
449.
▲
by
usrbinbash
3y ago
C++ isn't, but C was my first programming language, and I am thankful for this to this day. Because C in and of itself, is an incredibly simple language. It is made complex in libs, usually by abusing macros, or by trying to shoehorn
450.
▲
by
usrbinbash
3y ago
> If programmers will learn Rust as first language Imagine a person who just started learning about programming. A person who may still be tripped up by the fact that `=` and `==` are completely different things here. Imagine that person
More ›