Most active commenters

    ←back to thread

    182 points Twirrim | 16 comments | | HN request time: 0.526s | source | bottom
    1. harry8 ◴[] No.41874909[source]
    Is C++ capable of deprecating or simplifying anything?

    Honest question, haven't followed closely. rand() is broken,I;m told unfixable and last I heard still wasn't deprecated.

    Is this proposal a test? "Can we even drop support for a solution to a problem literally nobody has?"

    replies(6): >>41875009 #>>41875032 #>>41875407 #>>41875528 #>>41875757 #>>41875887 #
    2. epcoa ◴[] No.41875009[source]
    Signed integers did not have to be 2’s complement, there were 3 valid representations: signed mag, 1s and 2s complement. Modern C and C++ dropped this and mandate 2s complement (“as if” but that distinction is moot here, you can do the same for CHAR_BIT). So there is certainly precedence for this sort of thing.
    3. nialv7 ◴[] No.41875032[source]
    well they managed to get two's complement requirement into C++20. there is always hope.
    replies(1): >>41875491 #
    4. hyperhello ◴[] No.41875407[source]
    C++ long ago crossed the line where making any change is more work than any benefit it could ever create.
    5. oefrha ◴[] No.41875491[source]
    Well then someone somewhere with some mainframe got so angry they decided to write a manifesto to condemn kids these days and announced a fork of Qt because Qt committed the cardinal sin of adopting C++20. So don’t say “a problem literally nobody has”, someone always has a use case; although at some point it’s okay to make a decision to ignore them.

    https://lscs-software.com/LsCs-Manifesto.html

    https://news.ycombinator.com/item?id=41614949

    Edit: Fixed typo pointed out by child.

    replies(3): >>41875583 #>>41875873 #>>41876055 #
    6. mrpippy ◴[] No.41875528[source]
    C++17 removed trigraphs
    replies(1): >>41875630 #
    7. ripe ◴[] No.41875583{3}[source]
    > because Qt committed the carnal sin of adopting C++20

    I do believe you meant to write "cardinal sin," good sir. Unless Qt has not only become sentient but also corporeal when I wasn't looking and gotten close and personal with the C++ standard...

    8. poincaredisk ◴[] No.41875630[source]
    Which was quite controversial. Imagine that.
    9. Nevermark ◴[] No.41875757[source]
    I think you are right. Absolutely.

    Don’t break perfection!! Just accumulate more perfection.

    What we need is a new C++ symbol that reliably references eight bit bytes, without breaking compatibility, or wasting annnnnny opportunity to expand the kitchen sink once again.

    I propose “unsigned byte8” and (2’s complement) “signed byte8”. And “byte8” with undefined sign behavior because we can always use some more spice.

    “unsigned decimal byte8” and “signed decimal byte8”, would limit legal values to 0 to 10 and -10 to +10.

    For the damn accountants.

    “unsigned centimal byte8” and “signed centimal byte8”, would limit legal values to 0 to 100 and -100 to +100.

    For the damn accountants who care about the cost of bytes.

    Also for a statistically almost valid, good enough for your customer’s alpha, data type for “age” fields in databases.

    And “float byte8” obviously.

    replies(1): >>41876095 #
    10. epcoa ◴[] No.41875873{3}[source]
    Wow.

    https://theminimumyouneedtoknow.com/

    https://lscs-software.com/LsCs-Roadmap.html

    "Many of us got our first exposure to Qt on OS/2 in or around 1987."

    Uh huh.

    > someone always has a use case;

    No he doesn't. He's just unhinged. The machines this dude bitches about don't even have a modern C++ compiler nor do they support any kind of display system relevant to Qt. They're never going to be a target for Qt. Further irony is this dude proudly proclaims this fork will support nothing but Wayland and Vulkan on Linux.

    "the smaller processors like those in sensors, are 1's complement for a reason."

    The "reason" is never explained.

    "Why? Because nothing is faster when it comes to straight addition and subtraction of financial values in scaled integers. (Possibly packed decimal too, but uncertain on that.)"

    Is this a justification for using Unisys mainframes, or is the implication that they are fastest because of 1's complement? (not that this is even close to being true - as any dinosaurs are decomissioned they're fucking replaced with capable but not TOL commodity Xeon CPU based hardware running emulation, I don't think Unisys makes any non x86 hardware anymore) Anyway, may need to refresh that CS education.

    There's some rambling about the justification being data conversion, but what serialization protocols mandate 1's complement anyway, and if those exist someone has already implemented 2's complement supporting libraries for the past 50 years since that has been the overwhelming status quo. We somehow manage to deal with endianness and decimal conversions as well.

    "Passing 2's complement data to backend systems or front end sensors expecting 1's complement causes catastrophes."

    99.999% of every system MIPS, ARM, x86, Power, etc for the last 40 years uses 2's complement, so this has been the normal state of the world since forever.

    Also the enterpriseist of languages, Java somehow has survived mandating 2's complement.

    This is all very unhinged.

    I'm not holding my breath to see this ancient Qt fork fully converted to "modified" Barr spec but that will be a hoot.

    replies(1): >>41876530 #
    11. jfbastien ◴[] No.41875887[source]
    As mentioned by others, we've dropped trigraph and deprecated rand (and offer an alternative). I also have:

    * p2809 Trivial infinite loops are not Undefined Behavior * p1152 Deprecating volatile * p0907 Signed Integers are Two's Complement * p2723 Zero-initialize objects of automatic storage duration * p2186 Removing Garbage Collection Support

    So it is possible to change things!

    12. __turbobrew__ ◴[] No.41876055{3}[source]
    This person is unhinged.

    > It's a desktop on a Linux distro meant to create devices to better/save lives.

    If you are creating life critical medical devices you should not be using linux.

    replies(1): >>41876446 #
    13. bastawhiz ◴[] No.41876095[source]
    > For the damn accountants who care about the cost of bytes.

    Finally! A language that can calculate my S3 bill

    14. smaudet ◴[] No.41876446{4}[source]
    > If you are creating life critical medical devices you should not be using linux.

    Hmm, what do you mean?

    Like, no you should not adopt some buggy or untested distro, instead choose each component carefully and disable all un-needed updates...

    But that beats working on an unstable, randomly and capriciously deprecated and broken OS (windows/mac over the years), that you can perform zero practical review, casual or otherwise, legal or otherwise, and that insists upon updating and further breaking itself at regular intervals...

    Unless you mean to talk maybe about some microkernel with a very simple graphical UI, which, sure yes, much less complexity...

    replies(1): >>41876522 #
    15. __turbobrew__ ◴[] No.41876522{5}[source]
    I mean you should be building life critical medical devices on top of an operating system like QNX or vxworks which are much more stable and simpler.
    16. smaudet ◴[] No.41876530{4}[source]
    Yeah, I think many of their arguments are not quite up to snuff. I would be quite interested how 1s compliment is faster, it is simpler and thus the hardware could be faster, iff you figure out how to deal with the drawbacks like -0 vs +0 (you could do it in hardware pretty easily...)

    Buuuut then the Unisys thing. Like you say they dont make processors (for the market) and themselves just use Intel now...and even if they make some special secret processors I don't think the IRS is using top secret processors to crunch our taxes, even in the hundreds of millions of record realm with average hundreds of items per record, modern CPUs run at billions of ops per second...so I suspect we are talking some tens of seconds, and some modest amount of RAM (for a server).

    The one point he does have is interoperability, which if a lot of (especially medical) equipment uses 1s compliment because its cheaper (in terms of silicon), using "modern" tools is likely to be a bad fit.

    Compatability is King, and where medical devices are concerned I would be inclined to agree that not changing things is better than "upgrading" - its all well and good to have two systems until a crisis hits and some doctor plus the wrong sensor into the wrong device...