Live data from Hacker News

Featherweight Go

arxiv.org

131–140 of 169 posts

Re: Featherweight Go

#132
post #22
post #7

Earlier quoted context omitted.

Don't ever try Scala. I work on a mid-sized CRUD application, and everything we need to recompile from scratch it takes 10 minutes. Typescript and Go are amazing in comparison in that department, but I miss the stronger typing of Scala.

Switching off SBT to Bazel made writing scala so much more pleasant for this exact reason. Builds are 10x quicker, and the caching makes the initial build take 10 minutes, limited only by the speed of your internet connection!

Do you have any workable example? All the examples I tried haven’t worked on latest bazel version.

Re: Featherweight Go

#133
post #97

Earlier quoted context omitted.

because it's a breeze to read Golang, due in parts to the lack of generics

Why does genetics make things that’s for read?

Functions can be given semantic names (I.e. have meaning); block statements cannot.

If writing a function that can take an array or slice of any type of data requires providing a generic argument (I.e. so you can specify that the function returns a slice of the same type of data as it was given), then you can name it "reverse" if it reverses the array, write it only once, and every timr you use it, you read "reverse" and know what it does.

For loops dont have those names, and so have to be rewritten every time you use them. As such, every time you see a for loop, you have to read and parse every statement to see what it is doing, and if it has any unexpected side effects or bugs introduced via copy-paste or what not.

Re: Featherweight Go

#134
post #54

Earlier quoted context omitted.

They could have gone to 2001 technology way back. The Go FAQs say -> > " We haven't yet found a design that gives value proportionate to the complexity, although we continue to think about it." I mean if you are going to use 2001 technology, you could have found it long back.

Yet, they acknowledged it was a mistake not to consider them. > In three years of Go surveys, lack of generics has always been listed as one of the top three problems to fix in the language. https://blog.golang.org/why-generics By the way, they could have gone to 1974 (CLU), 1973 (ML), 1983 (Ada), 1986 (Eiffel), 1988 (Modula-3), 1990 (Sather & BETA), 1998 (C++), 2007 (D), 2009 (Java & Delphi). These are just the most…

[deleted]

Re: Featherweight Go

#135
post #97

Earlier quoted context omitted.

because it's a breeze to read Golang, due in parts to the lack of generics

Lack of generics just means you have to copy and paste everything, like any time you want to reverse a slice. for i := len(a)/2 - 1; i >= 0; i-- { opp := len(a) - 1 - i a[i], a[opp] = a[opp], a[i] } Actively hurts reading code as you have to credentialize in a code base to begin to be able to file entire code blocks into copy and pasted "idioms". Without generics you have to hope the stdlib gets a blessed generic fun…

Weird. While you could copy that from the SliceTricks Go wiki page, you could also just use `sort.Sort(sort.Reverse())` which seems to address all of your complaints.

Re: Featherweight Go

#136

Earlier quoted context omitted.

The "names and organization behind it" thing is needlessly condescending (not to mention false), and the ability to get things done without generics basically restates David's point. Was there something in this paper that you felt unfairly treated Rust, the language you represent on these threads? Because otherwise, I can't see what would motivate you to join this thread to snipe. I'm with David, for what it's worth.…

I went out of my way to make the point without condescension. Evidently I didn't succeed, and I'm sorry for that! Let me put it another way: Virtually all languages that have become popular recently have done so because of the backing of some large organization or another. There was a time when languages like Perl, Python, and PHP could arise out of basically nowhere and become popular. That time is gone, and now lan…

[deleted]

Re: Featherweight Go

#137
post #87

Earlier quoted context omitted.

I think Go is popular because of its simplicity and fantastic standard library. It can also feel sometimes like a dynamic language which has attracted people from ruby, python, JS, etc... communities. You say there's no place for it in the 21st century, yet it already has a place and it doesn't really need generics to continue living.

Thanks to generics and lambdas, Java's standard library includes concurrent mapreduce. Lacking generics, Go's standard library can't even offer https://golang.org/pkg/sync/#Map without sacrificing type safety.

I agree Java streams and concurrent collections are great.

I agree Go cannot offer similar things due to a weaker type system.

I willingly code Go day-to-day. I miss Java streams, and sometimes the codebase is slightly worse due to the lack of Java streams (or equivalent).

I accept a weaker language because I spend less time debating the Right Way to do things (Go is too inexpressive to support a Right Way), and because I can widen my hiring pool from those that know Java, to those that any language, knowing that they can easily pick up Go.

Re: Featherweight Go

#138
post #85

Earlier quoted context omitted.

You're commenting on a paper by expert programming language theorists describing a design that is both complex and (in some aspects) novel. Almost certainly an element of getting these people to work on it is Go's existing popularity, it's mentioned in the second sentence of the paper. If I understand you right, you are suggesting that instead of doing what they are doing now, they should have just used an existing d…

Yes, right from the beginning. Java isn't the only language to chose from.

Huh, if there are so many languages to choose from then people can choose one of those. Go will die its natural death. Where is the problem?

Re: Featherweight Go

#139
post #84
post #76

Earlier quoted context omitted.

They weren't convinced at the time. Now they feel compelled to act. How is this political?

They have been saying that for years now. Yet nothing to show other than an half finished code repository.

Jesus! They are building software for themselves that prioritize the things they want and need, not some rando commenters on social media. They have every right to go about things their own way and succeed or fail based on that. So far it seems to be working and a lot of people are quite happy with the results (myself included). You seem to be particularly upset by this. Why is it so terrible?

Re: Featherweight Go

#140
post #7
post #6

There’s also a generics implementation on a branch of the go repo. I’m most curious how they perform on compilation speed assuming a big project makes decent use of generics. I doubt golang would merge anything that causes significant slowdown. And I don’t blame them, the only reason I don’t dread TypeScript dev given its slow compile times is you can typecheck async and strip the typing information for the hot reloa…

Don't ever try Scala. I work on a mid-sized CRUD application, and everything we need to recompile from scratch it takes 10 minutes. Typescript and Go are amazing in comparison in that department, but I miss the stronger typing of Scala.

Is that due to Scala? Or SBT?

https://www.lihaoyi.com/post/SowhatswrongwithSBT.html

https://engineering.linkedin.com/blog/2018/07/how-we-improve...

Post reply on HN