News for hackers. Stuff that matters.
Re:Go makes it easier to write correct, clear and efficient ... by founderling on Friday May 10, 2019 @04:17AM (#19876037)
I love programming languages. And I love to reason about them. When I see an article comparing languages, I'm all in.

So I clicked on this one. Started skimming through it, looking for code. Found none. Came back here to share my disappointment.

I'm always confused about articles that talk about code and have little code to show. Are there programmers who enjoy reading them? Or are these articles made for non-programmers?

Another thing that always throws me off is fluff. The article starts with "Choosing a programming language isn’t easy.". What does this add to the article? It immediately makes me think the author stuffed this article for no reason. So I have to skim even faster to not being cheated of my time. Is there anybody out there who thinks having the article prefixed with "Choosing a programming language isn’t easy." makes it more valuable?

Re:Go makes it easier to write correct, clear and efficient ... by sacado2 on Friday May 10, 2019 @06:32AM (#19876559)
This article deals with "big picture" aspects, not specific syntactic details, so there is no reason for it to include code.

Backward compatibility, compilation speed, circular dependencies, small vs big specs, etc. What code do you want to show about these aspects?

> The article starts with "Choosing a programming language isn’t easy.". What does this add to the article?

It's an introduction. It's a very common writing technique. You don't start with the core content of the article, you start with a paragraph or a sentence about why you wrote the article in the first place. You did the same with you "I love programming language" opening.

Re:Go makes it easier to write correct, clear and efficient ... by founderling on Friday May 10, 2019 @07:02AM (#19876674)

    Backward compatibility, compilation speed,
    circular dependencies, small vs big specs,
    etc. What code do you want to show about
    these aspects?
Code that shows these aspects. What broke in Java because of language changes and why. How handling circular dependencies in one language makes code uglier then in the other. Examples of the specs.

    You did the same with you "I love
    programming language" opening.
That I love programming languages and to reason about them is an information about myself that the reader does not know in advance. That choosing a programming language is not easy is public knowledge that the readers already know. At least if they are programmers.

That is the point of my post. Asking who the target audience is. And how it is different from myself.

Re:Go makes it easier to write correct, clear and efficient ... by chrismorgan on Friday May 10, 2019 @09:58AM (#19877720)
Please do not use code formatting for quotations. Use the old de facto standard of a “> ” prefix.
Re:Go makes it easier to write correct, clear and efficient ... by founderling on Friday May 10, 2019 @01:32PM (#19880138)

    Please do not use code formatting for quotations.
Why not? I think it looks pretty good.
Re:Go makes it easier to write correct, clear and efficient ... by ColinCochrane on Friday May 10, 2019 @02:05PM (#19880530)
Code formatting is difficult to read on mobile because the text doesn't wrap properly. You end up having to scroll horizontally to read it all.
Re:Go makes it easier to write correct, clear and efficient ... by Fnoord on Saturday May 11, 2019 @02:13PM (#19887499)
FWIW, not only on mobile.
Re:Go makes it easier to write correct, clear and efficient ... by setr on Friday May 10, 2019 @09:18AM (#19877414)
>That choosing a programming language is not easy is public knowledge that the readers already know. At least if they are programmers.

Well that bit is certainly not true; passing by certain communities and you’ll be let known theres only one good answer: {lisp,c#,haskell,rust,js,c/++}

Re:Go makes it easier to write correct, clear and efficient ... by reallydude on Friday May 10, 2019 @04:22PM (#19881874)
> What code do you want to show about these aspects?

If not code, how do you prove these assertions? How do you measure them?

> It's an introduction.

Inappropriate for an analytical argument. Common for infotainment (entertainment masquerading as information).

Re:Go makes it easier to write correct, clear and efficient ... by piano on Wednesday May 15, 2019 @09:53AM (#19919367)
> This article deals with "big picture" aspects

Read: It's a rant and/or PR.

Re:Go makes it easier to write correct, clear and efficient ... by joppy on Friday May 10, 2019 @07:29AM (#19876781)
If you think that somebody writing a 6-word sentence at the start of an article to set the tone is "cheating you of your time", perhaps stop reading random articles on the internet, and then also leaving comments about them.
Re:Go makes it easier to write correct, clear and efficient ... by vlthr on Friday May 10, 2019 @06:57AM (#19876654)
Aren’t you being a bit uncharitable?

- The article focuses on the properties of codebases, not individual code snippets. While it would be very valuable to do compare the properties of entire codebases, that is demanding on both the reader and the author.

- Opening the article with a statement like “Choosing a programming language is never easy...” is an acknowledgement of the fact that he is not claiming Go is unequivocally the best in all scenarios. The author is signaling that he is a reasonable person, and while that may seem like fluff it is a necessary component of communicating with a wide audience.

Re:Go makes it easier to write correct, clear and efficient ... by csmnils on Friday May 10, 2019 @04:24AM (#19876064)
There is little code in the main article, but there is a link to a detailed Java vs. Go code comparison: https://yourbasic.org/golang/go-vs-java/
Re:Go makes it easier to write correct, clear and efficient ... by wcdolphin on Friday May 10, 2019 @10:28AM (#19878018)
That’s a bit of a straw man. 1. You are using go’s built in imaginary type, and writing one from scratch in Java. 2. That is no longer idiomatic Java. Use Autovalue and the comparison is a little more fair. The LOC and complexity still come out in go’s favor for this, no doubt. 3. Beating down on Java is fun, but with Kotlin interop and adoption rate, I think the comparison will become JVM vs X.
Re:Go makes it easier to write correct, clear and efficient ... by orbifold on Friday May 10, 2019 @11:47AM (#19878871)
I think you are misunderstanding the linked code. The imaginary type in the Go case is not build in.
Re:Go makes it easier to write correct, clear and efficient ... by wcdolphin on Friday May 10, 2019 @02:37PM (#19880829)
That is true.
Re:Go makes it easier to write correct, clear and efficient ... by bayesian_horse on Friday May 10, 2019 @04:26AM (#19876073)
Programmers enjoy writing them and then have flamewars about the topic. But reading? probably not so much...
Re:Go makes it easier to write correct, clear and efficient ... by tluyben2 on Friday May 10, 2019 @04:26AM (#19876072)
He even names examples he is comparing but the examples are not there; there are many links in there and I am not going to click them all... So why are those examples not there?
Re:Go makes it easier to write correct, clear and efficient ... by blablabla123 on Friday May 10, 2019 @12:28PM (#19879347)
Yeah but I think for non-trivial programs, say 10k+ lines of code, it's really difficult to show proper examples, not to speak of exhaustive coverage. Go in particular doesn't have many fancy language constructs and a lot of well written code in Go 1 might look a bit repetitive, especially the error handling. But once you wrote a larger program and followed best practices with error handling, you might be delighted how much more compact error messages are and still offer a lot of greppable things to debug after.

Probably there are languages that have a really expressive syntax that solve problems also in a scalable manner. For instance Python with its list comprehension that are a real code and time saver for software that does a lot with lists. (No coincidence it's so popular with ML.)

Re:Go makes it easier to write correct, clear and efficient ... by mratsim on Saturday May 11, 2019 @01:51PM (#19887399)
In ML you really want to use Numpy ndarrays, Pandas dataframes or Tensors.

A list is much too slow because:

- Not contiguous - No SIMD vectorization - No parallel processing

Lists are mostly used for list of containers (for example storing the arrays inputs of a function)

Re:Go makes it easier to write correct, clear and efficient ... by rolleTx on Friday May 10, 2019 @04:36AM (#19876113)
But it gives a lot of references to codes