[-] BatmanAoD@programming.dev 6 points 1 year ago

Before Rust, the main argument I heard from C++ enthusiasts against Ada was that it was a nice idea but too "design-by-committee". Which, yeah, is an ironic thing for C++ fans to say, but I guess that was enough 🤷

[-] BatmanAoD@programming.dev 5 points 1 year ago

"Scare quotes" definitely precede Austin Powers, though that may have spurred a rise in popularity of the usage. (Also, "trashy people never saw Austin Powers" is honestly a pretty weird statement, IMO.)

That said, in this case, arguably the quotes are appropriate, because "the github dictionary" isn't something that happened (i.e. a headline), but a thing they've made up.

[-] BatmanAoD@programming.dev 6 points 2 years ago

It is similar to old error codes, but I feel that this makes one always have to be mindful of error handling and the non happy path

Technically you need a separate linter (errcheck) to ensure you don't just ignore errors. This is...not great. (That should have been a compiler error.)

[-] BatmanAoD@programming.dev 6 points 2 years ago

I agree that it's a "cop-out", but the issue it mitigates is not an individual one but a systemic one. We've made it very, very difficult for apps not to rely on environmental conditions that are effectively impossible to control without VMs or containerization. That's bad, but it's not fixable by asking all app developers to make their apps work in every platform and environment, because that's a Herculean task even for a single program. (Just look at all the compatibility work in a codebase that really does work everywhere, such as vim.)

[-] BatmanAoD@programming.dev 6 points 2 years ago

For runtime reflection, no, you'd specifically be able to do things that would be impossible to optimize out.

But the proposal is actually for static (i.e. compile-time) reflection anyway, so the original performance claim is wrong.

[-] BatmanAoD@programming.dev 6 points 2 years ago

Oh, trust me, Qt is still primarily C++. It's effectively a massive set of C++ libraries.

[-] BatmanAoD@programming.dev 5 points 2 years ago

Are you sure the frameworks you've tried are actually "discontinued"? C++/CX is still supported, it's just not recommended because WinRt is standard-compliant (CX uses compiler extensions) and has some other advantages. UWP is also still supported.

[-] BatmanAoD@programming.dev 6 points 2 years ago

the author in his 11y of writing Rust never once heard about the philosophy of Rust/Unsafe Rust.

Are you...aware of who the author is? He literally co-wrote The Book, aka The Rust Programming Language.

[-] BatmanAoD@programming.dev 6 points 2 years ago

The standard differentiates between "unspecified" behavior, which is as you describe, and "undefined" behavior, which may be completely nondeterministic at runtime.

[-] BatmanAoD@programming.dev 6 points 2 years ago

That's an extremely niche set of requirements, largely because interoperating with C++ is, well, a nightmare, and partly because "fast code" means something very different to C++ devs than to most devs who use managed runtimes.

Also, there are different definitions of "safe". Rust takes a very C++ style view: it's "safe" in the sense that UB requires either a compiler bug or an explicit opt-in to something unsafe.

For other definitions of "fast" and "safe", sure, most garbage collected languages count. Java, C#, and Go are "fast enough" for most application code, and they mostly guarantee that errors will result in crashes rather than UB. Zig is as fast as C/C++/Rust (and integrates much more easily with C than any other language except C++) and has a very different approach to safety (mostly runtime checks in debug mode that are not included in release mode).

[-] BatmanAoD@programming.dev 5 points 3 years ago

It's not possible to instantiate or assign, which is more like a never type than a unit; and it is not possible to define new types with the same properties, which is also more like bottom than unit. But you're right that it's not actually a true never type since it can't represent function divergence.

I think the truth is just that Java's type system isn't very mathematically disciplined.

[-] BatmanAoD@programming.dev 6 points 3 years ago

OOP is classes, and their accompanying language features (primarily inheritance) and design patterns (e.g. factories).

view more: ‹ prev next ›

BatmanAoD

0 post score
0 comment score
joined 3 years ago