Hacker Newsnew | past | comments | ask | show | jobs | submit | mseepgood's commentslogin

> Octals must start with zero and then o/O literals.

No, the o/O is optional (hence in square brackets), only the leading zero is required. All of these are valid octal literals in Go:

0600 (zero six zero zero)

0_600 (zero underscore six zero zero)

0o600 (zero lower-case-letter-o six zero zero)

0O600 (zero upper-case-letter-o six zero zero)


My bad! I was wrong; added a playground demonstration the parsing behavior above.

You're looking at the wrong production. They are octal literals:

    octal_lit      = "0" [ "o" | "O" ] [ "_" ] octal_digits .

Thanks! Never considered that a 21st century language designed for “power of two bits per word” hardware would keep that feature from the 1970s, so I never looked at that production.

Are there other modern languages that still have that?


The values for x and y should't come from your brain, though (with the exception of 0). They should come from previous index operations like s.indexOf(...) or s.search(regex), etc.


Indeed. Or s.length, whatever that represents.


Delegation is key


So he only did four hours of actual work per day.


much like members of the original affluent societies, hunter-gatherers

https://en.wikipedia.org/wiki/Original_affluent_society#The_...

here is also a link to a video interview of Jeff Bezos explaining that he prioritizes sleep, because at his level, quality of decisions is more important than quantity of decisions.

https://www.youtube.com/watch?v=Ze0op3sJr2A


Read the critisim section. There is no reason to think hunter-gathers worked only 4 hours per week, unless you define work so narrowly that the majority of what they did doesn't count even though anyone who has done those tasks knows how much work they are.


This was in the middle of the Hundred Years War, too.


In all honesty that's probably true of most knowledge workers today.


What is work? Those religious services were mandatory to set the image of him as a king. The discussion around the jewels was also mandatory - again setting an image. While he had the ability to skip any of those things, not doing them sets him up as an image of a bad king and soon he will be removed.


Sounds about right for average office worker. WFH had its benefits too.


Which is still way more than most political elites of today do..


Is it some kind of CORBA?


You don't even have to write proper sentences. "me get error X how fix here code:" usually works.


Is asking good questions or making clear requests what people now refer to as 'prompt engineering'?


> sometimes a decision is better than nothing

Not in this case. The most popular Go proposal/issue of all times was 'leave "if err != nil" alone': https://github.com/golang/go/issues?q=is%3Aissue%20%20sort%3...


If go had started out having different syntax for error handling, would these same people request that it change to what go currently does? Or is this just resistance to change, and wanting to keep what they are used to?

I suspect it is the latter.


The second most popular issue was adding generics. So it's probably not a resistance to change.


It's good to have languages with different approaches to design and and with different design philosophies.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: