proposal
FizzBuzz Enterprise Edition
Our great sponsors
proposal | FizzBuzz Enterprise Edition | |
---|---|---|
46 | 329 | |
3,276 | 20,374 | |
0.5% | 1.4% | |
4.4 | 0.0 | |
13 days ago | 5 months ago | |
Go | Java | |
BSD 3-clause "New" or "Revised" License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
proposal
-
Does Go Have Subtyping?
The conclusion is pretty weird to me.
Go does rely on monomorphization for generics, just like C++ and Rust. The only difference is that this is an implementation detail, so Go can group multiple monomorphizations without worrying about anything else [1]. This form of hybrid monomorphization is being increasingly common, GHC does that and Rust is also trying to do so [2], so nothing special for Go here.
On the other hand, explaining variance as a lifted polymorphism is---while not incorrect per se---also weird in part because a lack of variance is at worst just an annoyance. You can always make an adopter to unify heterogeneous types. Rust calls it `Box`, Go happens to call it an interface type instead. Both languages even do not allow heterogeneous concrete (or runtime) types in a single slice! So variance has no use in both languages because no concrete types are eligible for variance anyway.
I think the conclusion got weird because the term "subtyping" is being misused. Subtyping, in the broadest sense, is just a non-trivial type relation. Many languages thus have a multiple notion of subtyping, often (almost) identical to each other but sometimes not. Go in particular has a lot of them, and even some relation like "T implements U" is a straightforward record subtyping. It is no surprise that the non-uniform value representation has the largest influence, and only monomorphization schemes and hetero-to-homogeneous adapters vary in this particular group.
[1] https://github.com/golang/proposal/blob/master/design/generi...
[2] https://rust-lang.github.io/compiler-team/working-groups/pol...
-
Backward Compatibility, Go 1.21, and Go 2
> I wonder: why not go further and say "there will never be a Go 2" in order to eliminate ambiguity about this?
They did, five years ago. Albeit with an “if”.
https://github.com/golang/proposal/blob/d661ed19a203000b7c54...
> If the above process works as planned, then in an important sense there never will be a Go 2. Or, to put it a different way, we will slowly transition to new language and library features. We could at any point during the transition decide that now we are Go 2, which might be good marketing. Or we could just skip it (there has never been a C 2.0, why have a Go 2.0?).
> Popular languages like C, C++, and Java never have a version 2. In effect, they are always at version 1.N, although they use different names for that state. I believe that we should emulate them. In truth, a Go 2 in the full sense of the word, in the sense of an incompatible new version of the language or core libraries, would not be a good option for our users. A real Go 2 would, perhaps unsurprisingly, be harmful.
-
Why Turborepo is migrating from Go to Rust – Vercel
Go Team wanted generics since the start. It was always a problem implementing them without severely hurting compile time and creating compilation bloat. Rust chose to ignore this problem, by relying on LLVM backend for optimizations and dead code elimination.
-
Major standard library changes in Go 1.20
As far as I can tell, the consensus for generics was "it will happen, but we really want to get this right, and it's taking time."
I know some people did the knee-jerk attacks like "Go sucks, it should have had generics long ago" or "Go is fine, it doesn't need generics". I don't think we ever needed to take those attitudes seriously.
> Will error handling be overhauled or not?
Error handling is a thorny issue. It's the biggest complaint people have about Go, but I don't think that exceptions are obviously better, and the discriminated unions that power errors in Rust and some other languages are conspicuously absent from Go. So you end up with a bunch of different proposals for Go error handling that are either too radical or little more than syntactic sugar. The syntactic sugar proposals leave much to be desired. It looks like people are slowly grinding through these proposals until one is found with the right balance to it.
I honestly don't know what kind of changes to error handling would appear in Go 2 if/when it lands, and I think the only reasonable answer right now is "wait and find out". You can see a more reasonable proposal here:
https://github.com/golang/proposal/blob/master/design/go2dra...
Characterizing it as a "lack of vision" does not seem fair here--I started using Rust back in the days when boxed pointers had ~ on them, and it seemed like it took Rust a lot of iterations to get to the current design. Which is fine. I am also never quite sure what is going to get added to future versions of C#.
I am also not quite sure why Go gets so much hate on Hacker News--as far as I can tell, people have more or less given up on criticizing Java and C# (it's not like they've ossified), and C++ is enough of a dumpster fire that it seems gauche to point it out.
-
What's the status of the various "Go 2" proposals?
As it says on that page - those were not proposals. They were draft ideas to get feedback on. You can see the list of proposals in this repository: https://github.com/golang/proposal
-
An alternative memory limiter for Go based on GC tuning and request throttling
Approximately a year ago we faced with a necessity of limiting Go runtime memory consumption and started work on our own memory limiter. At the same time, Michael Knyszek published his well-known proposal. Now we have our own implementation quite similar to what has been released in 1.18, but there are two key differences:
- Shaving 40% off Google’s B-Tree Implementation with Go Generics
-
I did something evil
They actually didn't.
-
On a potential "Partial Monomorphization"
Also take a look at https://github.com/golang/proposal/blob/master/design/generics-implementation-gcshape.md. This is a hybrid approach (like the one you're talking about) the Go compiler takes for its generics implementation. It uses GC allocation size classes ("shapes") to figure out how to group types that need to be monomorphized.
FizzBuzz Enterprise Edition
-
Simple Lasts Longer
That "Hello World Enterprise Edition" looks dangerously under-engineered - I could understand it! Far better to follow the best practices demonstrated in the Fizz Buzz Enterprise Edition...
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
-
Writing Clean Code with FastAPI Dependency Injection
Clean code is a balancing act - you’ll want to make sure you don’t turn your codebase into something like this.
- Milyen hasznos Github repokat ismertek?
-
Java 21 makes me like Java again
???
I'll answer your question with a question: Have you seen https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris... ? :)
I'm guess that to those of us who remember when Java came out, "FizzBuzz: EE" is what we think of when we think of Java. :P
In Java I have to type a bazillion characters to get anything done! And make all these useless directories and files and InterfaceClassFactoryProtocolStreamingSerializer BS. And worry about how that executes.
C++? No bloat*, just speed
*Yes, there's some _optional_ bloat. But compared to Java? no contest.
-
No One Wants Simplicity
There’s a difference between complexity that’s inherent to the problem, and complexity that’s added by developers who have drunk architectural cool aid.
This is an example where all of the complexity is caused by rigid adherence to the most popular architectural patterns of about 10 years ago.
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
It looks completely ridiculous to modern eyes, but during peak OOP it was just how you should do it.
If you like simplicity then your fizz buzz implementation would be a few lines.
-
55 GiB/s FizzBuzz (2021)
maybe it's fast, but is it enterprise quality? https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
- Ask HN: What are some of the most elegant codebases in your favorite language?
-
Another half-backed dependency injection crate
Nope, I wouldn't use it. I've seen many projects that use DI containers in my career, and every single one of them was a pain to navigate, particularly when trying to get a foothold as a newcomer. It can also force you into some very enterprise-y code patterns. Keep things simple. My mantra is "Add complexity as you find that you need it, and not a second sooner".
-
I'll use a hashmap 😛
Do you want a quick hack or a coder that's up to enterprisey standards? A proper solution could be in the 1.5 KLOC ballpark...
-
Is sequential IO dead in the era of the NVMe drive?
> you have no idea how much happens so your transaction doesn't get lost, corrupted, or errored out.
Maybe he doesn't, maybe he does - you don't know nor do I.
I'm pretty sure this is how IBM salesmen used to respond when confronted with those newfangled Unix systems which were starting to appear here and there, nibbling first, then taking larger bytes out of their market share. Instead of the litany of diverse systems they'd have thrown LPARs, SYSPlexs and ESMs around but in the end it still came down to the same thing: this stuff is too complicated to be left to amateurs. They were right, in a way... until those amateurs grew their wisdom teeth and took a large part of their market away from them.
Yes, "enterprise" stuff is complicated - often overly so [1] - and it has its place. This does not make it the only viable solution to these problems, something will eventually come up to eat your lunch just like IBM saw its herd of dinosaurs being overtaken by those upstart critters from the undergrowth. Maybe some smart software system which "guarantees" data reliability and availability without the need for "enterprise" storage devices? It wouldn't be the first time after all.
[1] https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
What are some alternatives?
Logback - The reliable, generic, fast and flexible logging framework for Java.
awesome-functional-python - A curated list of awesome things related to functional programming in Python.
Simple Java Mail - Simple API, Complex Emails (Jakarta Mail smtp wrapper)
yGuard - The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts
bitburner - Bitburner Game
Java-Hello-World-Enterprise-Edition
is-odd - I created this in 2014, the year I learned how to program. All of the downloads are from an old version of https://github.com/micromatch/micromatch. I've done a few other things since: https://github.com/jonschlinkert.
JavaCV - Java interface to OpenCV, FFmpeg, and more
go - The Go programming language
jsweet - A Java to JavaScript transpiler.
carbon - :black_heart: Create and share beautiful images of your source code
FizzBuzzEnterpris