Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. .NET 1.x Is Why We Can't Have Nice Things Reason #32

.NET 1.x Is Why We Can't Have Nice Things Reason #32

Scheduled Pinned Locked Moved The Lounge
csharptutorialcsscomhelp
31 Posts 14 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Mehdi Gholam

    Hopefully it will be all fixed in .net5! :rolleyes:

    Exception up = new Exception("Something is really wrong."); throw up;

    D Offline
    D Offline
    Dan Neely
    wrote on last edited by
    #21

    Mehdi Gholam wrote:

    Hopefully it will be all fixed in .net5! :rolleyes:

    .net core is opensource. Feel free to do MS's job for them (because we all know they won't :rolleyes:) and submit a PR.

    Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

    1 Reply Last reply
    0
    • A Amarnath S

      I've heard that .Net is largely inspired by Java. If the first version of .Net did not have generics, then perhaps Java also did not have generics at that time. How is Java managing its deprecation of features?

      B Offline
      B Offline
      BruceCarson
      wrote on last edited by
      #22

      Poorly

      1 Reply Last reply
      0
      • H honey the codewitch

        Because 1.x existed prior to generics we have issues of legacy object models not implementing IList<T> and instead simply exposing hard typed indexer properties. Normally, you'd just get the generic parameters of the generic IEnumerable<T> interface, but because some object trees were created prior to 2.0 - like the CodeDOM they don't have them. This makes determining the element type of a typed list extremely difficult. The problem is that your alternative is the indexer property which isn't a member of a hard interface, so you have to select the appropriate indexer property from the properties on that type. There might be this[string name] in there too, for example. There is no contract however, so there are no guarantees. This isn't especially robust. Which means, the obvious solution is to first try to get it using the generic interfaces, and if they aren't available, then we fall back to the less robust method above. This is not ideal, and it requires maybe a page of code to handle all the scenarios. Microsoft didn't put generics into 1.x I think because of time constraints, and if so they should have waited, IMO. Edit: For anyone interested I just posted a tip that solves this problem. How To Get A Collection Element Type Using Reflection in C#[^]

        Real programmers use butterflies

        O Offline
        O Offline
        obermd
        wrote on last edited by
        #23

        Wow, whining about something that was given away for free. Remember, you have never needed Visual Studio to compile a dotNet project. VS just made it easier.

        H 1 Reply Last reply
        0
        • Sander RosselS Sander Rossel

          Do you mean there are three argument Exceptions (which I can understand) or that message and paramName are switched in two of them? :~

          Best, Sander sanderrossel.com Migrating Applications to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #24

          The inconsistency in parameter order.

          1 Reply Last reply
          0
          • O obermd

            Wow, whining about something that was given away for free. Remember, you have never needed Visual Studio to compile a dotNet project. VS just made it easier.

            H Offline
            H Offline
            honey the codewitch
            wrote on last edited by
            #25

            I never said otherwise. Why are you even responding?

            Real programmers use butterflies

            1 Reply Last reply
            0
            • D Dan Neely

              honey the codewitch wrote:

              Microsoft didn't put generics into 1.x I think because of time constraints, and if so they should have waited, IMO.

              IIRC they couldn't wait because they'd lost the lawsuit with Sun over J++; and needed to get a nominal replacement stack out asap.

              Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

              H Offline
              H Offline
              honey the codewitch
              wrote on last edited by
              #26

              Oh yeah - i worked there during that mess.

              Real programmers use butterflies

              D 1 Reply Last reply
              0
              • H honey the codewitch

                Oh yeah - i worked there during that mess.

                Real programmers use butterflies

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #27

                At MS or at Sun? Either way, do you have any stories to share from the inside?

                Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                H 1 Reply Last reply
                0
                • D Dan Neely

                  At MS or at Sun? Either way, do you have any stories to share from the inside?

                  Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                  H Offline
                  H Offline
                  honey the codewitch
                  wrote on last edited by
                  #28

                  Sorry, I was at Microsoft. For the record, I was glad Sun was suing over Java, and I'm glad MS dropped Visual J++ because it was garbage.

                  Real programmers use butterflies

                  1 Reply Last reply
                  0
                  • A Amarnath S

                    I've heard that .Net is largely inspired by Java. If the first version of .Net did not have generics, then perhaps Java also did not have generics at that time. How is Java managing its deprecation of features?

                    B Offline
                    B Offline
                    bufalo1973
                    wrote on last edited by
                    #29

                    J2SE 5.0 (2004)

                    1 Reply Last reply
                    0
                    • Greg UtasG Greg Utas

                      .net++ That'd be .neu (new in German)!

                      Robust Services Core | Software Techniques for Lemmings | Articles

                      M Offline
                      M Offline
                      markrlondon
                      wrote on last edited by
                      #30

                      .not

                      1 Reply Last reply
                      0
                      • A Amarnath S

                        I've heard that .Net is largely inspired by Java. If the first version of .Net did not have generics, then perhaps Java also did not have generics at that time. How is Java managing its deprecation of features?

                        M Offline
                        M Offline
                        markrlondon
                        wrote on last edited by
                        #31

                        As I recall, .NET got generics somewhat before Java. (More than a year? I don't recall exactly).

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups