Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Maxatar
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
42 ms
·
601.
▲
by
Maxatar
2y ago
The ISO committee is becoming increasingly less relevant. It's ineffectiveness has pushed numerous groups to create a successor to C++. It's no doubt a lot of work but if any of the successors to C++ such as Carbon, Circle, or cpp
602.
▲
by
Maxatar
2y ago
Yeah I was programming from way before Stackoverflow existed and I simply call BS. No one learned Java or C by reading either of the following documents: https://docs.oracle.com/javase/specs/jls/se10/html
603.
▲
by
Maxatar
2y ago
Exactly, imagine thinking you can learn how to program Java or C just from being handed the language specification, or even learn how to play chess just by being told the rules of the game. Humans don't learn anything of substance just
604.
▲
by
Maxatar
2y ago
I have multiple friends who are doctors, and they will all tell you that 95% of their work is just trivial grudge work that almost anyone can do. Most cases that come to them are easily treatable and don't really require much of any ex
605.
▲
by
Maxatar
2y ago
>And when they land a job in the industry, where exactly are the optimization and ethics when transforming XML into JSON and back again? The programmers who are mostly only capable of doing this kind of grudge work will lose their jobs a
606.
▲
by
Maxatar
2y ago
I used to do this back when C++11 came out and ended up regretting it. When a feature just comes out, you can understand it possibly in isolation, but it's very hard to understand how that feature will fit in with other features, tools
607.
▲
by
Maxatar
2y ago
No compiler comes to close to completely supporting modules. MSVC is the furthest along and it does not by any means fully support modules. I think an upcoming version will finally have somewhat usable support for import std;
608.
▲
by
Maxatar
2y ago
The issue is that everyone has their own hopes and dreams for what modules in C++ should and could be, and what ended up being standardized is an unbelievably complicated and overengineered mess. A small number of people worked on standardi
609.
▲
by
Maxatar
2y ago
If you can prove in ZFC that the algorithm always halts for every input but it's undecidable in ZFC whether the algorithm is correct for every input, then it follows that the algorithm is correct for every input and hence P = NP. If yo
610.
▲
by
Maxatar
2y ago
A comment like "basically none" should not be taken literally. It is intended to indicate that the difference between the C++ approach and the C approach is that the C++ approach gives you a great deal of type safety to the point
611.
▲
by
Maxatar
2y ago
I feel like your claim is begging the question. It's certainly not true in principle that most problems in P have a small exponent. There is no shortage of graph related algorithms in P that have absolutely absurd exponents, like on th
612.
▲
by
Maxatar
2y ago
Assume that P = NP is undecidable, then it would not be possible to present an algorithm that is NP-complete and in P, since such an algorithm would imply that P = NP is decidable which contradicts the assumption that P = NP is undecidable.
613.
▲
by
Maxatar
2y ago
If P = NP is undecidable in ZFC then it necessarily follows that P != NP.
614.
▲
by
Maxatar
2y ago
The boilerplate gives you additional type safety compared to C. If you want the same type safety as C, which is basically none, then you can write it as: // foo.hpp struct Foo { static Foo* make(); void meth
615.
▲
by
Maxatar
2y ago
In C++ if you want an opaque type similar to your C example, then you give your class a static constructor. class Foo { public: static std::unique_ptr<Foo> create(); std::string getStringOrSomething();
616.
▲
by
Maxatar
2y ago
You don't need any indirection with partial because in C# all classes already go through a layer of indirection. However, consider that in C# if you add a field to a struct, which is a value type and hence no indirection, then you do n
617.
▲
by
Maxatar
2y ago
This doesn't make much sense. Sure you can forward declare a struct and functions that operate on it, but you can't call the function or instantiate the struct without the definition. That's no different than in C++. The purp
618.
▲
by
Maxatar
2y ago
>On another note: C++ compiler should by default keep statistics about the chain of #include's / parsing during compilation and dump it to a file at the end and also summarize how badly you're re-parsing the same .h files
619.
▲
by
Maxatar
2y ago
Having to pay a monthly fee in perpetuity in order to distribute an application is absolutely egregious.
620.
▲
by
Maxatar
2y ago
Java apps are not native on either macOS or Windows.
621.
▲
by
Maxatar
2y ago
Sure, people can write bad functions, I'll never disagree with that. I tend not avoid allowing what bad programmers do dictate how I or people on my team write code.
622.
▲
by
Maxatar
2y ago
So expand upon it, functions trivially compose unlike classes. There is nothing about deduplicating a function that prevents you from diverging from it later on. There could be some judgement calls and technical expertise needed to determin
623.
▲
by
Maxatar
2y ago
That sounds like a different problem. There is a difference between taking duplicated code and eliminating that duplication by using a function, and having a short function that calls another tiny function that in turn calls yet another tin
624.
▲
by
Maxatar
2y ago
No, maybe the acronym is ugly, sounds like pimple? But other than that the use of the technique is invaluable to writing stable ABIs which in turn makes distribution of C++ libraries a lot easier.
625.
▲
by
Maxatar
2y ago
You can statically link Qt in compliance with the LGPL. The LGPL only requires that users are able to substitute the LGPL'd portion of an application with an alternative and compatible implementation. Using a shared object/DLL is
626.
▲
by
Maxatar
2y ago
Sure, if the abstraction is very broad like a class, but I find I have a lot of success factoring out code that mostly looks the same into a plain function.
627.
▲
by
Maxatar
2y ago
The point is to eliminate the idea of an absence of a value. A variable is always assigned to a value, but there is a special value called null which behaves as a kind of sentinel value whose methods all return the null value for their resp
628.
▲
by
Maxatar
2y ago
We can quibble on definitions here, but a reference in C++ can not be null. The undefined behavior happens before any assignment to a reference is executed so that at the moment that the assignment happens, the reference is guaranteed to no
629.
▲
by
Maxatar
2y ago
That's an even tinier slice of a very tiny pie. You're talking about maybe 0.5 to 1% of Americans who were born near the US/Mexico border who speak Spanish better than English. According to the U.S. Census Data, only 18 milli
630.
▲
by
Maxatar
2y ago
The shock value should come from the fact that the US scores very low among developed countries. The UK, Canada, and most of Europe score much higher on literacy tests. The US has exceptional universities and colleges, but its K12 education
More ›