Featherweight Go
131–140 of 169 posts
Re: Featherweight Go
#132Earlier 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!
Re: Featherweight Go
#133Earlier 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?
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
#134Earlier 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…
Re: Featherweight Go
#135Earlier 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…
Re: Featherweight Go
#136Earlier 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…
Re: Featherweight Go
#137Earlier 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 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
#138Earlier 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.
Re: Featherweight Go
#139Earlier 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.
Re: Featherweight Go
#140There’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.
https://www.lihaoyi.com/post/SowhatswrongwithSBT.html
https://engineering.linkedin.com/blog/2018/07/how-we-improve...