• AgRi (unregistered)

    Who's Joe? And what did he do with Matteo?

  • (nodebb)

    I've seen, and as a clueless noob eons ago done, a couple of similar things.

    A new revision of the language adds some new hotness, such as .NET's nullable value types. Which hotness seems at first glance to have omitted a few basic use cases. Of course they are covered; you just don't know it yet.

    So before you have any real experience using the new hotness, and supremely confident you're more observant / complete a thinker than they are, you whip up your extensions for the stuff they "forgot". And proceed willy-nilly to use them all over the place in your code base when there is already better-thought out functionality available in the language.

    Your own ego makes it ~~hard~~ impossible to remove your stuff once you learn of the built-in right way, if indeed you ever do. And of course your homebrew tools have subtly different behavior, often as to corner cases or error handling, that makes it hard for follow-on devs to remove your stale trash and substitute built-in stuff. At least not without a lot of deep test coverage & bravery. Hah! What test coverage?

    As to Joe vs. Matteo, I suspect Matteo quit in disgust halfway through the stench-scrubbing, and poor Joe was hired to finish the half-done job. Which was even worse; now he had two competing stenches too scrub off.

  • (nodebb) in reply to WTFGuy

    I wouldn't call nullable value types new or hotness... First they are around since .NET framework 2.0, which is what, nearly 20 years now. That pretty much makes them ancient in IT terms, 200 years in human years. Secondly there's nothing hot about nullable value types, because they are just a standardized way for the last 20 years how to represent, well, nullable value types by not boxing them, which is incredible inefficient and people doing that are actively killing the planet :-)

  • (nodebb)

    I remember when HPC still meant "High Performance Computing" of which I've had the luck to see something. Today I read this thing and I'm somehow not surprised.

  • (nodebb) in reply to MaxiTB

    First they are around since .NET framework 2.0, which is what, nearly 20 years now

    And yet when 2.0 came out they were new...

  • Gnasher729 (unregistered)

    Just hope that your strings don’t contain any control characters like tab, carriage return or linefeed. Because then his string-to json conversion will produce an invalid json string.

  • Bagoly (unregistered)

    Could anybody explain this bit to me? "... Convert.ChangeType requires its type parameter to be a value type - which in C# terms actually requires it to be a "value type". "

    I've never heard of such a requirement. Looking at the 2 parameter overloads of 'ChangeType', it accepts an 'object?' and an argument of either 'Type' or 'TypeCode', both of which can represent reference types.

    AFAIK anything implementing 'IConvertible' can use 'ChangeType', for example using 'ChangeType' to cast from 'List<int>' to 'IEnumerable<int>', neither of which are value types, obviously.

    On the other hand, 'ref structs' are value types that will fail with 'ChangeType', because they cannot implement 'IConvertible' - or any interface, for that matter.

Leave a comment on “A Type of HPC”

Log In or post as a guest

Replying to comment #:

« Return to Article