News for hackers. Stuff that matters.
Re:I Love Go; I Hate Go by junke on Tuesday August 02, 2016 @08:57AM (#12209564)
I am really curious about the kind of tasks that are easily done in Go but for which Lisp doesn't quite fit.
Re:I Love Go; I Hate Go by _ph_ on Tuesday August 02, 2016 @09:08AM (#12209631)
Sometimes I like to have a fully statically typechecked program. You can do that in Lisp, its easier in Go. Also, it directly produces statically linked executables. You can do a lot of this in SBCL, it also produces executables, has type checking etc. But for some of this, you have to wrestle a bit with the Lisp system. The Common Lisp numeric tower is great - until you want to write low level programs where you just want to have machine word sized integers which may wrap around. I once even submitted an abstract to a Lisp conference addressing some of these issues, but as it was not accepted, this side-project was postponed (but I plan to revive it some day).

And of course, there is always the question of the environment. The Go universe has tons of libraries, actively developed.

Re:I Love Go; I Hate Go by unscaled on Tuesday August 02, 2016 @12:07PM (#12210937)
If you're looking for a FULLY statically typechecked program, you can easily do better than Go. Heck, even using Typescript or Javascript with Flow would give stronger typing than Go with its ubiquitous "interface{}".

Static executables by default is something that Go is famously good at, but I'm pretty sure Haskell can do this as well without so much pain and with a type system many times stronger than Go's.

Re:I Love Go; I Hate Go by junke on Tuesday August 02, 2016 @10:54AM (#12210375)
I guess I don't write the same kind of tools as you, I never need word sized integers. Generally, I define the types according to the problem domain and don't require a specific bit layout. A different case arises when you exchange data through a given protocol, but then you don't do computation with it, just encode/decode.
Re:I Love Go; I Hate Go by _ph_ on Tuesday August 02, 2016 @03:24PM (#12212570)
Word sized integers are fast to compute. So as long as your problem can be expressed with them, it is the fastest way to perform math. When using Common Lisp, I have flexible sized integer numbers, which is nice to have, but the performance penalty can be sometimes too high.
[dead]
Re:I Love Go; I Hate Go by scott_s on Tuesday August 02, 2016 @09:58AM (#12209942)
Please don't do this. You obviously disagree that Go is a language which provides full static typechecking. Please instead just state that disagreement, rather than feign confusion. It leads to much better discussions.
[dead]
Re:I Love Go; I Hate Go by scott_s on Wednesday August 03, 2016 @11:54AM (#12218828)
HN advocates the principle of charity - assuming the best possible intentions of the people you're talking to. In this case, that would mean assuming this person means something different when they use the phrase "fully statically typechecked", stating what you mean when you say it, and possibly linking to some source material to help further explain. It's quite possible they have the same understanding you do, they just are using the terms differently.
Re:I Love Go; I Hate Go by devishard on Wednesday August 03, 2016 @03:21PM (#12220700)
Okay, why don't you assume in everything I'm talking about fluffy rainbow butterflies or something nice like that? Principle of charity, right? That way we can both go our separate ways happily.

If someone doesn't mean "fully statically typechecked" then they shouldn't say "fully statically typechecked". It's not an ambiguous phrase.

Re:I Love Go; I Hate Go by scott_s on Wednesday August 03, 2016 @03:49PM (#12220935)
That is not what it means: http://philosophy.lander.edu/oriental/charity.html

People have different backgrounds and and experiences. It's reasonable for a person to think "fully statically typechecked" to mean "a program which is statically typechecked, and it does so to the entire program". That would apply to languages such as C, C++ and Go, which are statically typed, but give ways to subvert the type system. You probably mean something closer to "a program which has fully sound static typing", more along the lines of the MLs or Haskell, which have a richer type system which you cannot subvert.

We're here for interesting discussion. Derision is not a part of interesting discussion. You're relatively new here, so I figure it's worth explaining this explicitly.

Re:I Love Go; I Hate Go by devishard on Friday August 05, 2016 @01:15PM (#12234077)
> That is not what it means: http://philosophy.lander.edu/oriental/charity.html

I'm aware of what it means--I'm saying that the principle of charity doesn't apply. The principle of charity doesn't mean you get to actually change what the person is saying, it means you assume the best when there's ambiguity.

> People have different backgrounds and and experiences. It's reasonable for a person to think "fully statically typechecked" to mean "a program which is statically typechecked, and it does so to the entire program". That would apply to languages such as C, C++ and Go, which are statically typed, but give ways to subvert the type system.

But in the cases of C and Go, it's not just that--you can't use generics or templates, so you're stuck writing generic-like code with void* or object, respectively. That's not subverting the type system intentionally, it's just not type checked and there's no alternative. So these languages are not fully type checked, even if you don't subvert the type system. So even by your charitable definition, it's not fully statically type checked.

The word "fully" has a meaning that's not ambiguous. There's not an interpretation of "fully statically typechecked" that includes Go, even being charitable. Every nontrivial Go codebase has sections that are not statically typechecked and can't be modified to be statically typechecked.

> We're here for interesting discussion. Derision is not a part of interesting discussion.

I'm here for interesting discussion, and I don't think that an interesting discussion starts from obvious falsehoods like "Go is a fully statically-typed language". Derision discourages making such statements and increases the average interesting-ness of discussion because people are afraid to say dumb things. People should think before they make claims.

> You're relatively new here, so I figure it's worth explaining this explicitly.

I'm not new here, I just delete my accounts every so often.

Re:I Love Go; I Hate Go by scott_s on Friday August 05, 2016 @01:36PM (#12234232)
Derision is not civil, and explicitly discouraged.
Re:I Love Go; I Hate Go by devishard on Friday August 05, 2016 @05:24PM (#12235842)
True, but given the entire point here is to have interesting conversations, I think that's a higher priority than civility.
Re:I Love Go; I Hate Go by scott_s on Friday August 05, 2016 @09:17PM (#12236612)
They are considered the same thing here. There is a reason it comes first in the guidelines on comments.