8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions
comment 2y ago · link · parent
That's literally what enums are: A set of named constants.
You might be thinking of what is traditionally known as sum types, which some people have recently started calling enums[1]. Indeed, Go does not have sum types.
[1] Presumably because of Rust using the wrong term when specifying its sum types
comment 2y ago · link · parent
Rust doesn't have enums. It has sum types – that for some reason it arbitrarily decided to call enums.
Sum types are great. There is a good case to be made that Go would benefit from the addition of sum types. But until that day there isn't much more you can do with enums. That's all enums are – a set of named constants.
comment 2y ago · link · parent
Worse. The only time there was any real money to be made with web technologies was prior to 2000. Plain old boring RPC, serving interesting data to lowly web developers, is where the money has been made since.
comment 2y ago · link · parent
Not the greatest example. LLMs fundamentally cannot replace software developers. At the end of the day an LLM is just an interpreter, much like python, but using a different programming language. Any input to an LLM is developing software.
Perhaps the previous comment would be more understandable if phrased as:
"My reaction when I hear this is that those people are being paid entirely too much money if software developers can do their job."
comment 2y ago · link · parent
1. Again, that's implementation dependent, not a constraint of Go. The language says absolutely nothing about stacks. tinygo, for instance, uses a C stack.
2. Even in the case of gc, where the stack is unusual, it doesn't really matter. Once upon a time there was some meaningful latency introduced because of it, but that's not true anymore.
What is still something to think about, albeit unrelated to the stack, is if you want to statically link a cross-compiled C library. Cross-compiling C programs a really hard problem. Of course, that is a hard problem no matter what. It is no less easy to cross-compile a C library for a Python program, but the static linking adds an additional complication.
But, at the same time, you don't have to statically link libraries. You can opt to dynamically load libraries, thereby having no cross-compilation issues (assuming the shared library is already compiled for your target platform). This is how most of those other languages we've talked about are doing it to get around the linking challenges where cross-platform execution is pertinent. You can do the same in Go. Go binaries normally being statically linked end-to-end is generally considered a nice feature, but if you're willing to accept dynamic linking in another language...
Naturally, if you never build for systems outside of the system you are using, that's moot. Compiling and linking a C target that matches the platform it is being performed on is easy.
> How the runtime works still matters a lot.
Not really. Anything that might matter is abstracted away – at least to the same extent as other languages. Not your problem.
Interfacing with C is a first-class feature of Go. I don't know where you got the idea that it isn't. There are a lot of good reasons to keep all of your code in the same language (true of Go and every other language in existence), but it is hardly the end of the world if you have a solid reason to turn elsewhere.
comment 2y ago · link · parent
Cool, but the dictionary provides record of the prevailing use of words, and it is clear that the original comment was said in the same vein as how most people define it – "a timid and cowardly person (typically used of a man)". There was no association with female body parts (or cats, for that matter) made in the original comment. Whatever pet definition found in your community may be is irrelevant here.
> I suggest asking the women in your life how they feel about the term
I'll be sure to ask the cats in my life while I'm at it...
comment 2y ago · link · parent
comment 2y ago · link · parent
Yeah, it’s nonsensical, but such is people. Similar to why most people aren’t having children in their sexual prime, instead waiting until they are of geriatric age. The harsh reality is that society says it’s wrong to have children “young” and ostracizes anyone who does. Just ask any teenage mother about the scorn they had to deal with.
Thousands of years ago most people didn't have time to sit around and evaluate what other people, especially those outside of the immediate tribe, do. Back then, life was actually hard. Only the richest kings could even begin to live in that kind of luxury. And even up until around the 1950s, most people lived rurally, so the kids weren't apt to leave the property anyway – if they did, who was going to see it? Not to mention that there wasn't the "You must go to university or you will ruin your life" nonsense that has emerged in the past ~30 years. Hell, in my grandparents time, it was uncommon to even go to high school. Back then, growing up and having children was celebrated, not featured on MTV with a show that tries to convince people to remain children for life.
The times have changed and the people have adjusted accordingly. When the public welcomes children back into the world, the parents will let their children back out into the world. But so long as the passive onlookers who don't know how to think rationally or keep their mouth shut believe that children should be nothing more than porcelain dolls that are there only to hang on the shelf for guests to admire...
comment 2y ago · link · parent
I guess that’s why the average home built today is ~100% bigger than an average home built 100 years earlier - ironically, when people actually had large families. No concept of what large even is.
comment 2y ago · link · parent
They aren't worried about the child. Anyone with a typical five year old knows they'll be able to cross the neighbourhood just fine.
What they are actually worried about what other adults will think the five year old is seen out alone.
comment 2y ago · link · parent
But it is also, according to the same dictionary, defined as "a cat" as well as "a timid and cowardly person (typically used of a man)." It turns out that words can have more than one meaning and is pretty clear, given the context, that the last definition is the one at play here.
If there is any kind of conflation happening, it is only you that has done the conflating. If you don't like your behaviour, just don't do it? Seems pretty simple. No need to tell us about it.
comment 2y ago · link · parent
Poor people aren't apt to care if someone thinks they are an asshole, but the middle class people we're talking about feel like they have to keep up appearances for some reason. And, so, they miss out on having children they claim they want because of it. Strange, but that's people for ya. They don't put much thought into things.
comment 2y ago · link · parent
But tech people love to come up with new definitions for the same terms all the time, so anything goes.
comment 2y ago · link · parent
You must have copied the wrong account, then. The American farmer in the 19th century owned their land. They were not under serfdom. These were quite wealthy people. By the 19th century, anyone who was poor was relegated to the city.
> The act is not “slaving away,” it is a common chore.
Is there something actually here or are you just trying to go down some silly semantic rabbit hole because you don't want to admit that people don't have children simply because they don't want to have children?
comment 2y ago · link · parent
Where the people were rich, sure. Of course you were going to have all the generations living in your castle. Why wouldn't you? But for a poor family in that 200 sq.ft. thatch hut? Yeah, no.
> Chopping vegetables and handwashing dishes are chores, not “slaving away in the kitchen.”
Fine, slave away in the dining room. I don't care where the actual chore was done. The significance is the act, not the precise location.
comment 2y ago · link · parent
No doubt. Poor people have always had to leave their family behind to make a go of life. There weren't enough resources found "at home" to support multiple adult generations. But when one is rich, they don't have to set out unto the world. They can bring the resources to where they already are.
> I don’t think forcing kids to literally cook supper was a typical responsibility.
Alone? Probably not. Alongside a parent? Most definitely. There wasn't enough time in the day to get everything done if you didn't have their help. I will also note that rich people today also have modern kitchen appliances to further replace those children, so even if you're not going to McDonalds, you're probably using things like a food processor and dishwasher to do the work the children would have historically done. So, again, no need for the 'mule'.
comment 2y ago · link · parent
In what way? Is it because you call `C.function_name` instead of `function_name`, the latter of which some other languages will allow? I don't see how that is a meaningful difference. Especially when Go developers are already accustomed to referencing pure Go functions in the same way.
> Go has its own type of stack
gc brings its own type of stack, but that's not a feature of Go. Let's not confuse an implementation with a language. Go says nothing about stack layout.
> which means it's a pain in the ass to embed into the C runtime and it's a pain in the ass to embed the C runtime into it.
There might be a pain in the ass for the gc maintainers, but that's not you. You will never notice or care. It is fully abstracted away.
There is some overhead cost to that, but it has shrunk so dramatically over the years, you're not going to notice it anymore either. Protip: Don't use version 1.5 like the previous link is talking about. That was 17 major versions ago.
> I honestly had no idea either project existed.
How'd you miss gccgo, at least? It's maintained by the official Go team. It is the second compiler they always talk about – the one they use to ensure that the standard isn't defined by an implementation.
comment 2y ago · link · parent
Yet, hilariously, the average home size keeps on growing. Where I live, the average home built today is 25% larger than in 1990 and 100%+ larger than the average house prior to 1950. There is a pretty strong inverse correlation between family size and housing size – as families get smaller, houses get bigger.
It seems people have no trouble bearing the cost of larger housing. They just don't want to fill them with people. Again, because people don't want the children.
Why would they? You don't need the 'mule' anymore. Rich people can hire someone else from outside of the family to do the work. Today, you don't need a kid slaving away in the kitchen to ensure you are fed, you can simply go to McDonalds.
comment 2y ago · link · parent
Sure, so as you point out there is absolutely no reason why you can't have children, even if you are in the most dire of straights[1]. As you point out, other people will happily help you out with those children if you are struggling to make it on your own.
The only reason to not have children is because you don't want them. Anything else is a lame excuse.
[1] Of course, we're specifically talking about middle class people here. Middle class people don't live in tents. They live in comparatively large houses that are far bigger than would ever be necessary to raise many children. Even if they wanted to live in smaller houses, must jurisdictions don't allow it.