Readit News logoReadit News
jpcfl commented on The C23 edition of Modern C   gustedt.wordpress.com/202... · Posted by u/bwidlar
int_19h · 10 months ago
It should be ++C because with C++ the value you get from the expression is the old one.

If you're asking why people use pre-increment by default instead of post-increment, it's mostly historical. The early C compilers on resource-constrained platforms such as early DOS were not good at optimization; on those, pre-increment would be reliably translated to a simple ADD or INC, whereas code for post-increment might generate an extra copy even if it wasn't actually used.

For C++ this was even worse with iterators, because now it depended on the compiler's ability to inline its implementation of postfix ++, and then prove that all the copies produced by that implementation have no side effects to optimize it to the same degree as prefix ++ could. Depending on the type of the underlying value, this may not even be possible in general.

The other reason is that all other unary operators in C are prefix rather than postfix, and mixing unary prefix with unary postfix in a single expression produces code that is easy to misunderstand. E.g. *p++ is *(p++), not (*p)++, even though the latter feels more natural, reading it left-to-right as usual. OTOH *++p vs ++*p is unambiguous.

jpcfl · 10 months ago
> It should be ++C because with C++ the value you get from the expression is the old one.

You get it!

jpcfl commented on The C23 edition of Modern C   gustedt.wordpress.com/202... · Posted by u/bwidlar
bitbasher · 10 months ago
Really looking forward to #embed, once the compilers catch up. Until then, Golang.
jpcfl · 10 months ago
Or

    xxd --include <file>
:)

jpcfl commented on The C23 edition of Modern C   gustedt.wordpress.com/202... · Posted by u/bwidlar
belter · 10 months ago
Important reminder just in the Preface :-)

Takeaway #1: "C and C++ are different: don’t mix them, and don’t mix them up"

jpcfl · 10 months ago
Bjarne should have called it ++C.
jpcfl commented on Apple has reached its first-ever union contract with store employees in Maryland   apnews.com/article/apple-... · Posted by u/heavyset_go
consteval · a year ago
It's not an appeal to emotions, it's a logical argument.

You're saying "well okay it could negatively impact business".

I'm replying "that doesn't mean anything, and sometimes negatively impacting business is very good".

It's not enough to just say something. You need to explain WHY. So what? Who cares? If you don't answer that, I'm sorry, you don't have an argument and anyone wise would choose to not listen to you.

It's bad for business. Okay let's assume that's true. So what? What's the big idea? What's the cost versus the benefit?

jpcfl · a year ago
> sometimes negatively impacting business is very good

This is an oxymoron.

jpcfl commented on Suspicious data pattern in recent Venezuelan election   statmodeling.stat.columbi... · Posted by u/kgwgk
culi · a year ago
[flagged]
jpcfl · a year ago
Anyone who calls this election fair is not impartial. The scale of the fraud is enormous and undeniable.

Tell me, how many Venezuelans abroad were able to vote? How many were kept out of the country because the borders were closed? How many were threatened or intimidated into voting for Maduro? How many votes were cast using false ID? How many were confused by the ballot which had 13 options to vote for Maduro? How many polling stations were closed at the last minute?

jpcfl commented on Apple has reached its first-ever union contract with store employees in Maryland   apnews.com/article/apple-... · Posted by u/heavyset_go
consteval · a year ago
My point is that "bad for business" on its own doesn't really mean much. Often people can't see the holes in their arguments or beliefs. But when you enlarge the view and take it to its logical conclusion, the holes become obvious.
jpcfl · a year ago
And my point is that a store deciding to unionize could negatively impact the business. Calling for the death of the company, and inciting images of child slaves in chains is not an argument against that. It's an appeal to emotion.
jpcfl commented on Apple has reached its first-ever union contract with store employees in Maryland   apnews.com/article/apple-... · Posted by u/heavyset_go
consteval · a year ago
It certainly is, and I would imagine letting the children chained up in your sweatshop go would be bad for business too. On the bright side, their eyes won't be adjusted to the sunlight, so they won't get very far.

Yes, you can frame this as "bad for business". Contrary to what all the armchair economists online will say, you should never just do what's good for business. If we did we would be seeing crimes against humanity. And we do, just not here.

Its always a balancing act. Often what's good for business isn't good, and what's bad for business isn't bad. You need more robust reasoning than that. Because if that's all you're relying on to form your opinions, you have no substance.

jpcfl · a year ago
When Apple chains children up in sweatshops, please let me know.
jpcfl commented on Apple has reached its first-ever union contract with store employees in Maryland   apnews.com/article/apple-... · Posted by u/heavyset_go
brianzelip · a year ago
> Just because a company is large doesn't mean it needs to start making poor business decisions

To be clear this is also inflammatory rhetoric disguised as what some would have you think is ‘common sense’.

jpcfl · a year ago
Is it not possible that employees forming a union could be bad for business?
jpcfl commented on Apple has reached its first-ever union contract with store employees in Maryland   apnews.com/article/apple-... · Posted by u/heavyset_go
tadfisher · a year ago
At this size, shuttering a store in retaliation for unionizing should result in the corporate death penalty. If Apple doesn't want to deal with unions, then they can feel free to make the point moot, by giving their employees an ownership stake in the company.
jpcfl · a year ago
> At this size

Size has nothing to do with it. Just because a company is large doesn't mean it needs to start making poor business decisions.

> corporate death penalty

That's a bit extreme. If you want to be seen as objective, this kind of inflammatory rhetoric will only work against you.

jpcfl commented on Panic at the Job Market   matt.sh/panic-at-the-job-... · Posted by u/speckx
JohnFen · a year ago
It's a personal blog. There's nothing wrong with being as casual as you like on your personal blog.
jpcfl · a year ago
There is if your goal is to attract a wider audience. Call me old fashioned, but if you can't even be bothered to capitalize the first letter of each sentence in your publication, I'm probably not going to read it.

u/jpcfl

KarmaCake day280February 12, 2021View Original