Earlier quoted context omitted.
The top 10 according to Red Monk[1] are JavaScript, Java, Python, PHP, C#, C++, CSS, Ruby, C, Objective-C, Swift, TypeScript, Scala, Shell, Go, R, PowerShell, Perl, Haskell, Kotlin. Of these, Javascript (w3), Python (Python Foundation), CSS (w3), C++ (ISO), Ruby (community), C (ISO), Shell (Posix), R (community), Perl (community), and Haskell (community) are not bound to a single company. [1] https://redmonk.com/sogr…
> The top 10 according to Red Monk[1] are JavaScript, Java, Python, PHP, C#, C++, CSS, Ruby, C, Objective-C, Swift, TypeScript, Scala, Shell, Go, R, PowerShell, Perl, Haskell, Kotlin. Top 20?
Go is Google's language, not ours
621–630 of 679 posts
Re: Go is Google's language, not ours
#622Earlier quoted context omitted.
I wonder if they'd ever consider adding hygienic macros instead of templates/generics. To me, that solves the problem of needing to write the same code for float32+float64 and so on. And it doesn't require so much careful thought about the type system, accidentally creating an awkward metalanguage like happened in C++.
Rust people are very glad that Rust brought high-kinded types to replace the most common uses of hygienic macros. Using macros for everything is a nightmare. About using them as generics, how do you enforce constraints? Unconstrained generics won't lead you far (or better, will lead you far into JS's Wat territory).
> About using them as generics, how do you enforce constraints?
I'm really thinking about the case for numerical algorithms where the exact same code works for different types (say float32 and float64 in Go). It sucks to copy and paste hundreds of lines of code and it sucks to have a separate code generator write your file for you (essentially an external macro processor). Imagine something like the C preprocessor for Go, but without the well known flaws of the C preprocessor:
#define IMPLEMENT_FOOBAR(NAME, TYPE) \
void NAME(TYPE* ptr, long len) { \
hundred lines of implementation here \
}
IMPLEMENT_FOOBAR(foobar32, float32)
IMPLEMENT_FOOBAR(foobar64, float64)
That parametric polymorphic enough for a lot of use cases, and this could work with data structures too.As for constraints, you can pass function names as arguments too. For instance:
IMPLEMENT_SORT(sort_baz, baz, bazcompare)
Other proposed features in go, such as the "check" statement for error handling, are probably implementable as a nice macro if you had a good macro language. This means the core language wouldn't have to grow, and features like "check" could be imported from a library. Including features like this in a library means the core language isn't bound by backwards compatibility when a better idea comes along. Old code used the old library, new code uses the new one, and the language stays clean and compatible with both.Re: Go is Google's language, not ours
#623Earlier quoted context omitted.
Maybe the tool chain is hardcoded to use the standard compiler? But that's more likely because of YAGNI, not because the rust community hates freedom.
The toolchain is built on top of rustup which very purpose is managing multiple compilers. If one were to build a different rustc it could be swapped in even in the world we have today.
Re: Go is Google's language, not ours
#624Earlier quoted context omitted.
F# and Haskell are two very nice languages if you want to try something truly different.
... and if you are ok with investing to adapt newcommers coming to your team and fine with lack of people actively using it
Re: Go is Google's language, not ours
#625Earlier quoted context omitted.
Rust people are very glad that Rust brought high-kinded types to replace the most common uses of hygienic macros. Using macros for everything is a nightmare. About using them as generics, how do you enforce constraints? Unconstrained generics won't lead you far (or better, will lead you far into JS's Wat territory).
IMO, Rust has a very nice macro system, and this is a good thing (although I'm not familiar with any changes they've made in the last year or two). It's a bad thing that sometimes one needs to resort to the macro system because other features in Rust don't play well together, but that's a long topic with no solution in sight. > About using them as generics, how do you enforce constraints? I'm really thinking about th…
For their first implementation of BIDS, initially provided with Borland C++ 2.0 for MS-DOS.
Finding out the release date is left as exercise for the reader.
Re: Go is Google's language, not ours
#626I pity the recent CS graduates that weren't able to attend a decent CS degree and need Go to fit their mental model.
Haven't we had to ask you before not to do programming language flamewars on HN? Please don't do programming language flamewars on HN. We detached this subthread from https://news.ycombinator.com/item?id=19978882 and marked it off-topic.
Although to be fair you need to apply the same rule to others as well on this same thread.
Re: Go is Google's language, not ours
#627Earlier quoted context omitted.
Eiffel and Ada are languages for proper software engineering. Go not so much, specially given its toy type system, where one cannot even do Type Driven Design.
> proper software engineering Only if you define this in such a way that it's tautologically true. If your definition of software engineering incorporates some degree of economic success, then no, these languages don't work well. I'm sure someone will be tempted to levee this strawman argument: "But lots of languages drive projects that make more money than Go!" Note that I never claimed market success was the sole c…
All of them provide more features for software engineering at large scale that Go is still catching up with, hence Go 2.0 proposals.
Re: Go is Google's language, not ours
#628Earlier quoted context omitted.
I disagree, as I remember a lot of talks and articles from Go team members where they discuss in detail established work in other languages – on GC, on language evolution, on generics and so on – and deliberately learn from them to avoid same mistakes.
It's not a matter of agreement or disagreement. It's facts. Another user on here put it well: https://news.ycombinator.com/item?id=19979613
Re: Go is Google's language, not ours
#629Earlier quoted context omitted.
VB is de facto dead, declared legacy in 2008 & latest major release was in 1998. VB.NET is a new incompatible language, everyone invested in VB needed to retrain skills & rewrite existing software. It was a huge uproar in the community, but MS didn't care enough & this goes against TS idea that the community can stop a major company doing this sort of thing. It can happen & it will happen again. However that does not…
Yet on a past life I managed to migrate code without any major issues, other than components that weren't available on .NET.
"VB.NET is a new incompatible language, everyone invested in VB needed to retrain skills & rewrite existing software."
Re: Go is Google's language, not ours
#630Earlier quoted context omitted.
Haven't we had to ask you before not to do programming language flamewars on HN? Please don't do programming language flamewars on HN. We detached this subthread from https://news.ycombinator.com/item?id=19978882 and marked it off-topic.
I most likely missed it. Although to be fair you need to apply the same rule to others as well on this same thread.