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. C#/ / .NET Observation

C#/ / .NET Observation

Scheduled Pinned Locked Moved The Lounge
csharpc++csscomtutorial
38 Posts 22 Posters 0 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.
  • J James R Twine

    As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

    -=- James
    Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
    Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
    See DeleteFXPFiles

    S Offline
    S Offline
    Shog9 0
    wrote on last edited by
    #3

    James R. Twine wrote:

    Is it just me, or does anyone else notice that as well?

    I haven't seen it yet, but the day is still young and i still have a great deal of code to review. :sigh: FWIW, i use std::map and std::multimap frequently. Very handy templates.

    1 Reply Last reply
    0
    • J James R Twine

      As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

      -=- James
      Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
      Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
      See DeleteFXPFiles

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #4

      A lot of developers learn by copy-and-paste and have not been exposed to the other collection options in .NET. Personally, my predominate collection type is the generic List<>. In the .NET environment the efficiency is close so many choose the hash incorrectly thinking it does not matter. I have many discussions with Junior developers about the importance of order in certain sets. Most of which falls on deaf ears until something blows up in there face.

      Need a C# Consultant? I'm available.
      Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway

      M B 2 Replies Last reply
      0
      • E Ennis Ray Lynch Jr

        A lot of developers learn by copy-and-paste and have not been exposed to the other collection options in .NET. Personally, my predominate collection type is the generic List<>. In the .NET environment the efficiency is close so many choose the hash incorrectly thinking it does not matter. I have many discussions with Junior developers about the importance of order in certain sets. Most of which falls on deaf ears until something blows up in there face.

        Need a C# Consultant? I'm available.
        Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway

        M Offline
        M Offline
        MidwestLimey
        wrote on last edited by
        #5

        I agree, I use List<> frequently when order is not an issue. I seldom use Hashtable unless both key and value are both of type Object, which is exceptionally rare. Usually I know what the key is going to be. I remember one developer got stumped on some of my code when they encountered a linked list, I was forced to refactor it to a much less elegant solution! I can also remember when a migrating VB 'developer' told me "I hate arrays, arrays are hard and multi-dimensional arrays are impossible, I never use them". Still makes me smile thinking about it.


        I'm largely language agnostic


        After a while they all bug me :doh:


        1 Reply Last reply
        0
        • J James R Twine

          As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

          -=- James
          Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
          Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
          See DeleteFXPFiles

          N Offline
          N Offline
          Nemanja Trifunovic
          wrote on last edited by
          #6

          When I was working with C# before happily returning back to C++ one thing I noticed being *really* abused was the reflection. I understand there are valid uses of reflection/introspection - mostly for the dev tools and code analysis - but creating the complete UI out of some crazy XML files with reflection was simply wrong - it made the application less robust and it would take forever to start.

          Programming Blog utf8-cpp

          M J 2 Replies Last reply
          0
          • J James R Twine

            As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

            -=- James
            Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
            Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
            See DeleteFXPFiles

            realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote on last edited by
            #7

            I have never knowingly used a hashtable in C#, and I stayed as far away as possible from STL when I was doing C++.

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            J A 2 Replies Last reply
            0
            • J James R Twine

              As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

              -=- James
              Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
              Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
              See DeleteFXPFiles

              D Offline
              D Offline
              Dario Solera
              wrote on last edited by
              #8

              Hmm, I've never used an Hashtable explicitly myself, but I use Dictionary<TKey, TValue> quite often, as well as List<T>. Could you provide some example (not code, just scenarios, otherwise we'd hurt the feelings of the lounge)?

              If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Photos/CP Flickr Group - ScrewTurn Wiki

              1 Reply Last reply
              0
              • N Nemanja Trifunovic

                When I was working with C# before happily returning back to C++ one thing I noticed being *really* abused was the reflection. I understand there are valid uses of reflection/introspection - mostly for the dev tools and code analysis - but creating the complete UI out of some crazy XML files with reflection was simply wrong - it made the application less robust and it would take forever to start.

                Programming Blog utf8-cpp

                M Offline
                M Offline
                Marc Clifton
                wrote on last edited by
                #9

                Nemanja Trifunovic wrote:

                but creating the complete UI out of some crazy XML files with reflection was simply wrong - it made the application less robust and it would take forever to start.

                :~ :-D Marc

                Thyme In The Country Interacx My Blog

                J 1 Reply Last reply
                0
                • J James R Twine

                  As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

                  -=- James
                  Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                  Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                  See DeleteFXPFiles

                  M Offline
                  M Offline
                  Marc Clifton
                  wrote on last edited by
                  #10

                  protected KeyedList<ViewListenerKey, List<SessionContainerListener>> viewListeners;
                  protected KeyedList<ViewListenerKey, ViewKeyData> viewKeyData;
                  protected KeyedList<SessionContainerViewListenerKey, List<DataTable>> sessionTransactions;

                  Run. Don't walk, run. :-D Marc

                  Thyme In The Country Interacx My Blog

                  P D 2 Replies Last reply
                  0
                  • J James R Twine

                    As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

                    -=- James
                    Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                    Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                    See DeleteFXPFiles

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #11

                    It does not surprise me that people did not use std::map, most people simply used CArray and didn't move beyond that. Personally, I used std::map all the time, although not for collections of numbers or collections of 5 objects :-) The syndrome is the same in both cases, only a subset of the people using a language are interested in learning to use it well.

                    Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                    U 1 Reply Last reply
                    0
                    • J James R Twine

                      As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

                      -=- James
                      Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                      Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                      See DeleteFXPFiles

                      L Offline
                      L Offline
                      led mike
                      wrote on last edited by
                      #12

                      James R. Twine wrote:

                      I have seen LOTS of uses of the Hashtable type

                      In Pre .NET 2.0 code. 2.0 introduced Generics and everything collection wise changed drastically. All old collection code should be migrated to using Generics, well there are exceptions of course but as a rule of thumb, just do it. So stop looking at 1.X code. ;P

                      led mike

                      U 1 Reply Last reply
                      0
                      • C Christian Graus

                        It does not surprise me that people did not use std::map, most people simply used CArray and didn't move beyond that. Personally, I used std::map all the time, although not for collections of numbers or collections of 5 objects :-) The syndrome is the same in both cases, only a subset of the people using a language are interested in learning to use it well.

                        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                        U Offline
                        U Offline
                        User of Users Group
                        wrote on last edited by
                        #13

                        It's not just the abuse of reflection which is abundant but as mentioned blind 'hey it'll handle it for me' CLR collection following and not understanding how expensive those, default and often dev induced, lousy Equality tests are. There is much hacking there and MS attempting to fix by-large an inefficient and at times broken model. It isn't funny, IEquatable, IComparable, casts, boxing even when many think they are avoiding it, virtual dispatch, devs not understanding good hash impls, you name it. I mean it is obvious when a C# guy asks for VB.NET to be converted and vice versa. And I agree whenever a return to C++ is due, it ends up always refreshing. Even if you have no System.Object, KeyValueDictionary generic is involved in hash as well, it makes most of the code involved, or better put modeling/naming with it suck too ( Heck the hash in object is the Java idea, but I'll agree hash has its purposes and at least one dynamic language implementation excels on it). Anyway, after 7 years of working with collections in .NET I think it just shows how badly the entire show is for Key/Value, value vs reference, and runtime binding.. Don't even get me on multiple inheritance, something no matter what runtime zealots say is bad, it just blasts away all key/value attempts to 100% .NET runtime blindess. It is all meant to be about building types, but when you look at it CLR/Java mentality prefers to get a guy thinking he is up and running quick and cool. And after a while you just see the effect it has on software quality: Incorectness/incompleteness, RAM and CPU over-utilisation.

                        L 1 Reply Last reply
                        0
                        • U User of Users Group

                          It's not just the abuse of reflection which is abundant but as mentioned blind 'hey it'll handle it for me' CLR collection following and not understanding how expensive those, default and often dev induced, lousy Equality tests are. There is much hacking there and MS attempting to fix by-large an inefficient and at times broken model. It isn't funny, IEquatable, IComparable, casts, boxing even when many think they are avoiding it, virtual dispatch, devs not understanding good hash impls, you name it. I mean it is obvious when a C# guy asks for VB.NET to be converted and vice versa. And I agree whenever a return to C++ is due, it ends up always refreshing. Even if you have no System.Object, KeyValueDictionary generic is involved in hash as well, it makes most of the code involved, or better put modeling/naming with it suck too ( Heck the hash in object is the Java idea, but I'll agree hash has its purposes and at least one dynamic language implementation excels on it). Anyway, after 7 years of working with collections in .NET I think it just shows how badly the entire show is for Key/Value, value vs reference, and runtime binding.. Don't even get me on multiple inheritance, something no matter what runtime zealots say is bad, it just blasts away all key/value attempts to 100% .NET runtime blindess. It is all meant to be about building types, but when you look at it CLR/Java mentality prefers to get a guy thinking he is up and running quick and cool. And after a while you just see the effect it has on software quality: Incorectness/incompleteness, RAM and CPU over-utilisation.

                          L Offline
                          L Offline
                          led mike
                          wrote on last edited by
                          #14

                          User of Users Group wrote:

                          and MS attempting to fix by-large an inefficient and at times broken model.

                          Mostly the model is broken by the loose nut between the chair and the keyboard.

                          led mike

                          U 1 Reply Last reply
                          0
                          • L led mike

                            User of Users Group wrote:

                            and MS attempting to fix by-large an inefficient and at times broken model.

                            Mostly the model is broken by the loose nut between the chair and the keyboard.

                            led mike

                            U Offline
                            U Offline
                            User of Users Group
                            wrote on last edited by
                            #15

                            Yeah right, I can see your post below and you are probably not aware (or the guy voting you 5, plenty of those runtime lovers around) most of those Generics still use the hash (and some broken/unchecked runtime comparisons if you prefer), it has nothing to do with 1.1 :) Besides when they initially did that Rotor hack in MSR, many people in languages field (and less broken models) just went: *sigh*. Generics (List and some other bits aside) are so weak in comparison to alternatives by not just C++, it doesn't surprise me to see people believe they are sooo, oh soo 'powerful', or thinking that by default they really eliminate boxing or virtual dispatch (that is the type responsibility and implementing one as complete as MS does for its own, shows you how much bloat is involved to express a simple primitive).

                            modified on Thursday, January 31, 2008 3:07:44 PM

                            L E 2 Replies Last reply
                            0
                            • N Nemanja Trifunovic

                              When I was working with C# before happily returning back to C++ one thing I noticed being *really* abused was the reflection. I understand there are valid uses of reflection/introspection - mostly for the dev tools and code analysis - but creating the complete UI out of some crazy XML files with reflection was simply wrong - it made the application less robust and it would take forever to start.

                              Programming Blog utf8-cpp

                              J Offline
                              J Offline
                              Jim Crafton
                              wrote on last edited by
                              #16

                              Nemanja Trifunovic wrote:

                              but creating the complete UI out of some crazy XML files with reflection was simply wrong

                              (cough)XAML(cough)(gag)(spittle)

                              ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

                              P 1 Reply Last reply
                              0
                              • realJSOPR realJSOP

                                I have never knowingly used a hashtable in C#, and I stayed as far away as possible from STL when I was doing C++.

                                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                -----
                                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                J Offline
                                J Offline
                                Jim Crafton
                                wrote on last edited by
                                #17

                                Why? Associative arrays have all sort of legitimate uses. Why wouldn't you use them?

                                ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

                                1 Reply Last reply
                                0
                                • U User of Users Group

                                  Yeah right, I can see your post below and you are probably not aware (or the guy voting you 5, plenty of those runtime lovers around) most of those Generics still use the hash (and some broken/unchecked runtime comparisons if you prefer), it has nothing to do with 1.1 :) Besides when they initially did that Rotor hack in MSR, many people in languages field (and less broken models) just went: *sigh*. Generics (List and some other bits aside) are so weak in comparison to alternatives by not just C++, it doesn't surprise me to see people believe they are sooo, oh soo 'powerful', or thinking that by default they really eliminate boxing or virtual dispatch (that is the type responsibility and implementing one as complete as MS does for its own, shows you how much bloat is involved to express a simple primitive).

                                  modified on Thursday, January 31, 2008 3:07:44 PM

                                  L Offline
                                  L Offline
                                  led mike
                                  wrote on last edited by
                                  #18

                                  User of Users Group wrote:

                                  Generics still use the hash

                                  Yes i reacted to Hashtable and apparently missed the overall point of the thread, oops :doh:

                                  User of Users Group wrote:

                                  it has nothing to do with 1.1

                                  Of course since i missed the point I was talking about this.[^] Generics are the most powerful feature of C# 2.0. Generics allow you to define type-safe data structures, without committing to actual data types. This results in a significant performance boost and higher quality code, because you get to reuse data processing algorithms without duplicating type-specific code. and[^] Collision Resolution in the Dictionary Class

                                  The Dictionary class differs from the Hashtable class in more ways than one. In addition to being strongly-typed, the Dictionary also employs a different collision resolution strategy than the Hashtable class, using a technique referred to as chaining. Recall that with probing, in the event of a collision another slot in the list of buckets is tried. (With rehashing, the hash is recomputed, and that new slot is tried.) With chaining, however, a secondary data structure is utilized to hold any collisions. Specifically, each slot in the Dictionary has an array of elements that map to that bucket. In the event of a collision, the colliding element is prepended to the bucket's list.

                                  User of Users Group wrote:

                                  you are probably not aware

                                  If and when that is true, I don't know nor will I ever know everything, I am the loose nut breaking things. You might have read my initial post as excluding myself as the nut causing the problems, not so.


                                  Last modified: 31mins after originally posted --

                                  E 1 Reply Last reply
                                  0
                                  • U User of Users Group

                                    Yeah right, I can see your post below and you are probably not aware (or the guy voting you 5, plenty of those runtime lovers around) most of those Generics still use the hash (and some broken/unchecked runtime comparisons if you prefer), it has nothing to do with 1.1 :) Besides when they initially did that Rotor hack in MSR, many people in languages field (and less broken models) just went: *sigh*. Generics (List and some other bits aside) are so weak in comparison to alternatives by not just C++, it doesn't surprise me to see people believe they are sooo, oh soo 'powerful', or thinking that by default they really eliminate boxing or virtual dispatch (that is the type responsibility and implementing one as complete as MS does for its own, shows you how much bloat is involved to express a simple primitive).

                                    modified on Thursday, January 31, 2008 3:07:44 PM

                                    E Offline
                                    E Offline
                                    El Corazon
                                    wrote on last edited by
                                    #19

                                    User of Users Group wrote:

                                    or the guy voting you 5, plenty of those runtime lovers around)

                                    actually the guy voting him a 5 may support the statement but not the stance... ;) often cases, most models, in mosts languages, are broken by the nut behind the keyboard. The result is often something that works small but doesn't scale, or that needs rewriting consistently over years, or any number of other things that happen to it. supporting that statement neither supports nor refutes the use of generics, lambda operations or any number of newer language features over the years. Almost anything "can" be used for good, but usually the nut behind the keyboard is holding back either C++ or C# or even any other language you or I or the world can invent. :-D :-D

                                    _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                                    1 Reply Last reply
                                    0
                                    • L led mike

                                      James R. Twine wrote:

                                      I have seen LOTS of uses of the Hashtable type

                                      In Pre .NET 2.0 code. 2.0 introduced Generics and everything collection wise changed drastically. All old collection code should be migrated to using Generics, well there are exceptions of course but as a rule of thumb, just do it. So stop looking at 1.X code. ;P

                                      led mike

                                      U Offline
                                      U Offline
                                      User of Users Group
                                      wrote on last edited by
                                      #20

                                      Plenty of loose nuts in ASP.NET source, WPF dragging itself, and default provision of method implementation by CLR in many, many types :-) Go on, look at their source, use shift operator on the bits, all in an idea of runtime that is supposed to abstract blitting and bits.. You'll end up with Java or Java IDE feeling when users stress your app, reasons are outlined in that generic, one that cannot even properly compare value types, and frankly that is a disaster, mass-market, language design, Anders Legend-Lover or not. But you knew that anyway..

                                      1 Reply Last reply
                                      0
                                      • J James R Twine

                                        As I now need to start getting into C# after a very happy and fruitful live with C++, I have noticed something and wanted to know if any other pre-C#/.NET developers have noticed the same thing.    I have seen LOTS of uses of the Hashtable type - far more than I would expect.  And in places where I would not normally expect.  For example, I have seen keys like "1", "2", "3", etc. (i.e. simple indexers), or seen them used for collections of less than 5 items or so.    It just seems a bit weird to me - I mean, std::map and std::multimap have been around for a number of years, and I have seen plenty of complex systems that rarely used them.  But now I see the simplest systems _(ab)_use Hashtable.    Is it just me, or does anyone else notice that as well?    I am not sure if it is the child with a hammer syndrome or not... What do you think?    Peace!

                                        -=- James
                                        Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
                                        Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
                                        See DeleteFXPFiles

                                        S Offline
                                        S Offline
                                        Stuart Dootson
                                        wrote on last edited by
                                        #21

                                        Given that I do C++,not C#...when I use STL, I am pretty aware of the big-O characteristics of the different containers - they're specified in the standard, for crying out loud!  C#...dunno - what are the big-O characteristics? I'd presume they are similar to the STL containers...but I really don't know. Also - C#..is it VB6 for the 00's? Not entirely, I'm sure, but I think the VB6 programmers have moved to C# :-)

                                        M 1 Reply Last reply
                                        0
                                        • J Jim Crafton

                                          Nemanja Trifunovic wrote:

                                          but creating the complete UI out of some crazy XML files with reflection was simply wrong

                                          (cough)XAML(cough)(gag)(spittle)

                                          ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

                                          P Offline
                                          P Offline
                                          Pete OHanlon
                                          wrote on last edited by
                                          #22

                                          Jim Crafton wrote:

                                          (cough)XAML(cough)(gag)(spittle)

                                          Nay. MyXAML - that's the way. ;)

                                          Deja View - the feeling that you've seen this post before.

                                          My blog | My articles

                                          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