Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
motorest
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
211.
▲
by
motorest
1y ago
> Digital Mars C++ has had contracts since, oh, the early 1990s? I think that implementations trying out their own experimental features is normal and expected. Ideally, standards would be pull-based instead of push-based. The real quest
212.
▲
by
motorest
1y ago
> To me, this article misses the mark. Yes, I agree. The blogger shows a fundamental misunderstanding of what it means to "make invalid states unrepresentable". I'll add that the state machine example is also pretty awful.
213.
▲
by
motorest
1y ago
> Wouldn’t it be nice if you just didn’t need to worry about it? Do you worry about it? I mean, to begin with, do you purposely try to reuse objects that you explicitly moved? If you do, in the very least you can be lazy and reassign a n
214.
▲
by
motorest
1y ago
> It’s… not a part of the langage which mandates a default ctor in the first place. Why should it, tough? Think about it. The goal of move semantics is performance, mainly avoiding to copy/initialize expensive objects using a standa
215.
▲
by
motorest
1y ago
> That's partly true, partly circular. I don't think there is anything "partly" about it being true. A moved-from object is expected to remain valid and preserve class invariants. If you wrote a class whose objects fa
216.
▲
by
motorest
1y ago
Are they, though? I mean, is it a feature to make something usable? If you have hard performance constraints and you know what routes you need to suppport, a generic but prohibitively expensive routing strategy can prevent you from using th
217.
▲
by
motorest
1y ago
> Since I use move semantics all the time (...) Everyone who ever uses C++ uses move semantics all the time,including move elision. It's not an obscure feature. > (...) this is for me the most frustrating thing about C++ full sto
218.
▲
by
motorest
1y ago
> Making the moved from object inaccessible like in Rust would have required static ownership tracking which I guess the C++ committee was afraid to commit to (...) I'm not sure the "afraid to commit to" is a valid interpr
219.
▲
by
motorest
1y ago
> This was one of the most unsatisfying things about learning C++ move semantics. They only kinda move the thing, leaving this shell behind is a nightmare. I don't know what nightmares you have. The only requirement that C++ specifi
220.
▲
by
motorest
1y ago
> When you say you must, do you mean that it’s best practice, that or that this is UB or similar? I'm not OP, but the only requirements that C++ imposed on moved-from objects is that they remain valid objects. Meaning, they can be s
221.
▲
by
motorest
1y ago
> The problem with the current move semantics is that, compared to e.g. Rust: 1) the compiler generates unnecessary code and 2) instead of just implementing class T you must implement a kind of optional<T>. I don't know what y
222.
▲
by
motorest
1y ago
I've worked with C++ for a number of years, with a few codebases that were >1M LoC. Never did I stumbled upon a situation where an object was moved and an existing symbol became a problem. I wonder what you are doing to get yourself
223.
▲
by
motorest
1y ago
> I didn't use them, some bots did. Sort it out with them. For you to put together this sort of argument with a straight face, you need to have little to no understanding of how the internet in general, services and web apps work. G
224.
▲
by
motorest
1y ago
> Because they support a lot more features? Not necessarily. For example, some minimal web frameworks actually provide multiple routing strategies because different implementation strategy have tradeoffs.
225.
▲
by
motorest
1y ago
And then they pull out the invoice where they prove without any doubt that you actually used pay-per-use services and ran up a 100k bill because you failed to do any sort of configuration.
226.
▲
by
motorest
1y ago
> When I was learning to program through a bootcamp I spun up an elastic beanstalk instance that was free but required a credit card to prove your identity. Is it just me or is this just a cheap excuse to grab a payment method from unsus
227.
▲
by
motorest
1y ago
> I'm not sure there's anything "impossible" about how small this is. You don't really need a lot of lines of code to support routes, request and response and nothing else. If anything, 765 lines of code for this
228.
▲
by
motorest
1y ago
> You must be young. XML and XML Schemas existed before JSON or Protobuf, and people ditched them for a good reason and JSON took over. I'm not sure you got the point. It's irrelevant how old JSON or XML (a non sequitur) are. T
229.
▲
by
motorest
1y ago
> JSON exists (...) The blog post leads with the personal assertion that "ad-hoc and built by amateurs". Therefore I doubt that JSON, a data serialization language designed by trimming most of JavaScript out and to be parses wi
230.
▲
by
motorest
1y ago
> Protobufs are better but not best. This sort of comments doesn't add anything to the discussion unless you are able to point out what you believe to be the best. It reads as an unnecessary and unsubstantiated put-down.
231.
▲
by
motorest
1y ago
> Don't forget the opportunity cost. Urban land is extremely valuable, so if you're using it for car parking instead of shop, restaurants, homes, or offices you're missing out on a lot of potential income. Indeed, and to b
232.
▲
by
motorest
1y ago
> Just with those two criteria you’re down to, like, six formats at most, of which Protocol Buffers is the most widely used. What I dislike the most about blog posts like this is that, although the blogger is very opinionated and critica
233.
▲
by
motorest
1y ago
> I paid over $50 USD for parking a bit over two hours in Cambridge Massachusetts when visiting MIT. Parking in the Boston area is atrocious. The two are related. The whole point of charging for parking is to leverage scarcity to convinc
234.
▲
by
motorest
1y ago
> Type checking is a first line of defense against bugs. That's all. Exactly, and it goes way beyond that point. Static type checking turns expensive, hard-to-catch bugs that manifest only at runtime when exercising specific code pa
235.
▲
by
motorest
1y ago
> This is silly. Yes, the article is deeply unserious and perhaps even in "not even wrong" territory. The poor blogger tried to put up a strawman on how type checking was a cognitive load issue, completely ignoring how interfac
236.
▲
by
motorest
1y ago
> Hey, I heard about how utility pole inspecting helicopters are able to tell the good/rotten state of wooden telephone poles by the reverb pattern of sound waves coming off the poles from the rotors There is a whole field dedicated
237.
▲
by
motorest
1y ago
> Then why did HTML became so popular if win32 or MFC were so great? One of the factors is that web dev pushes for a complete separation of concerns, and thus allows frontend developers to specialize in front end development. Therefore i
238.
▲
by
motorest
1y ago
> Not necessarily since they have to do with the inherently complex niche features like unified server/client rendering (...) My point is that it's fishy how they push features that just so happen to be the value proposition o
239.
▲
by
motorest
1y ago
> You have to remember, Next is the only framework that can support some of the features in the latest version of React. That is extremely fishy, isn't it?
240.
▲
by
motorest
1y ago
> The train of thought is “what is everyone using? I’ll use that too” I'm not so sure about that. We're seeing Next.js being pushed as the successor of create-react-app even in react.dev[1], which as a premise is kind of stupid
More ›