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. Fed-up with strongly typing

Fed-up with strongly typing

Scheduled Pinned Locked Moved The Lounge
comhardwarequestion
61 Posts 29 Posters 3 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.
  • G Guirec

    Strongly typing has one big advantage: it will force you to grow from a jerk to a proficient programmer. Yes, many programmers never get proficient but then strongly typing is not the cause :-) But here we are: when you are proficient in your domain of expertise (eg: embedded, gaming, LOB apps, multi-million users websites or whatever is your mod) then strongly typing is just a pain... It only multiplies by X (I am curious here... anyone? ) the number of reserved keywords you have to type to get to an equivalent result that you would get with a dynamic language. What do you guys think?

    Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

    W Offline
    W Offline
    W Balboos GHB
    wrote on last edited by
    #27

    Well - for some odd reason the micro-rant remapped in my mind to the following: It's easier to "go" into your diaper than got to the bathroom facilities and taking care of your business with some grace. It may be easier to just do what you want wherever you want to do it but the downside irritations (coding or diapering) from the shortcuts are sure to catch up with you some day. There are some benefits within the price of growing up (?)

    "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

    "As far as we know, our computer has never had an undetected error." - Weisert

    "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

    G 1 Reply Last reply
    0
    • W W Balboos GHB

      Well - for some odd reason the micro-rant remapped in my mind to the following: It's easier to "go" into your diaper than got to the bathroom facilities and taking care of your business with some grace. It may be easier to just do what you want wherever you want to do it but the downside irritations (coding or diapering) from the shortcuts are sure to catch up with you some day. There are some benefits within the price of growing up (?)

      "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

      "As far as we know, our computer has never had an undetected error." - Weisert

      "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

      G Offline
      G Offline
      Guirec
      wrote on last edited by
      #28

      Man, I had to google 'diaper' to understand and finally get to the highly philosophical point of your post... You might be the wise man of the thread : maybe I am simply getting older and am unconsciously ccoming back to my youngest behaviours ;P Boobs, give me boobs!

      Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

      1 Reply Last reply
      0
      • G Guirec

        Freak30 wrote:

        The compiler will surely check them all.

        I want one of these! Please let me know which compiler as you are using. A compiler which checks all code path is priceless!

        Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

        Richard Andrew x64R Offline
        Richard Andrew x64R Offline
        Richard Andrew x64
        wrote on last edited by
        #29

        Guirec Le Bars wrote:

        Please let me know which compiler as you are using.

        It's called C#

        The difficult we do right away... ...the impossible takes slightly longer.

        G 1 Reply Last reply
        0
        • Richard Andrew x64R Richard Andrew x64

          Guirec Le Bars wrote:

          Please let me know which compiler as you are using.

          It's called C#

          The difficult we do right away... ...the impossible takes slightly longer.

          G Offline
          G Offline
          Guirec
          wrote on last edited by
          #30

          sorry, if that's a joke I did not get it... C# is the name for a language and your compiler is most probably csc.exe then. this compiler is far (far = 'years away' but that is not further than any other compiler I am aware of) from being able to analyse all possible code paths....

          Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

          B 1 Reply Last reply
          0
          • G Guirec

            Strongly typing has one big advantage: it will force you to grow from a jerk to a proficient programmer. Yes, many programmers never get proficient but then strongly typing is not the cause :-) But here we are: when you are proficient in your domain of expertise (eg: embedded, gaming, LOB apps, multi-million users websites or whatever is your mod) then strongly typing is just a pain... It only multiplies by X (I am curious here... anyone? ) the number of reserved keywords you have to type to get to an equivalent result that you would get with a dynamic language. What do you guys think?

            Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

            R Offline
            R Offline
            Ravi Bhavnani
            wrote on last edited by
            #31

            Strong typing allows the compiler to catch errors, which is the cheapest way.  If you ride without training wheels, you should know how to ride or expect to fall.  Preferably both. /ravi

            My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

            1 Reply Last reply
            0
            • G Guirec

              sorry, if that's a joke I did not get it... C# is the name for a language and your compiler is most probably csc.exe then. this compiler is far (far = 'years away' but that is not further than any other compiler I am aware of) from being able to analyse all possible code paths....

              Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

              B Offline
              B Offline
              BobJanova
              wrote on last edited by
              #32

              The C# compiler, and any other compiler for a strongly- and statically-typed language, certainly will check the data type of variables through every possible code path. It may not know the value of a variable at a particular point or evaluate all possible paths through the code (that is impossible for anything which takes external input, after all), but it can check the type, and if you make a type related mistake anywhere in your code, it will be caught.

              G J 2 Replies Last reply
              0
              • G Guirec

                Marc Clifton wrote:

                If you don't like typing, you shouldn't be a programmer.

                I am a programmer cause I never liked repetitive tasks, I believe that typing .net/java code is highly repetitive... You might think differently: fair enough. But with all respect I am not judging what you should or should not be or do.

                Marc Clifton wrote:

                Not to mention that I wouldn't write anything that requires performance in a dynamic language

                Many dynamic languages outperform statically typed languages... just have a go with LUA you should not be disappointed. And code is not all... the environment has a lot to do: run some compiled C# in IIS and compare performance with interpreted JS in node or run PHP within ligthy and you might end-up handling more than 3000 requests/sec http://redmine.lighttpd.net/projects/lighttpd/wiki/PoweredByLighttpd[^]... Drop me a note when you achieve the same with csharp :-D

                Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                A Offline
                A Offline
                Andy Brummer
                wrote on last edited by
                #33

                Guirec Le Bars wrote:

                Drop me a note when you achieve the same with csharp

                Easy. Asp.net has had asyncronous handlers for years, plus the http caching layer runs partialy at the driver level. You are writing async code and aren't using any drag and drop junk at that point, but the asp.net platform has way more performance than the web forms libraries.

                Curvature of the Mind now with 3D

                G 1 Reply Last reply
                0
                • B BobJanova

                  The C# compiler, and any other compiler for a strongly- and statically-typed language, certainly will check the data type of variables through every possible code path. It may not know the value of a variable at a particular point or evaluate all possible paths through the code (that is impossible for anything which takes external input, after all), but it can check the type, and if you make a type related mistake anywhere in your code, it will be caught.

                  G Offline
                  G Offline
                  Guirec
                  wrote on last edited by
                  #34

                  Great. The compiler help me in making sure I don't mix-up class Person with class Country or int with Toto. Awesome... Do you really need a compiler for this? I mean, can't you just concentrate when writing code? Or adopt Hungarian Apps style which is definitely every programmer's friend? Anyway you are not answering the vey valid point of Freak30

                  Freak30 wrote:

                  And what if the proficient programmer misses one of the code paths during his tests

                  Answer: I don't know! But I am sure that csc does not help in any way for that! The .net platform gives too many facilities which make the posiible code paths just too numerous (infinite? at least overflowing...)

                  Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                  B 1 Reply Last reply
                  0
                  • A Andy Brummer

                    Guirec Le Bars wrote:

                    Drop me a note when you achieve the same with csharp

                    Easy. Asp.net has had asyncronous handlers for years, plus the http caching layer runs partialy at the driver level. You are writing async code and aren't using any drag and drop junk at that point, but the asp.net platform has way more performance than the web forms libraries.

                    Curvature of the Mind now with 3D

                    G Offline
                    G Offline
                    Guirec
                    wrote on last edited by
                    #35

                    Easy? if you say so... IMHO, asp.net can't handle 3000 requests per second. Even if you remove every single HttpModule and just stick to a very basic HttpHandler....

                    Andy Brummer wrote:

                    Asp.net has had asyncronous handlers for years

                    hopefully... at OS level everything is asynchronous by nature. Synchronicity has been brought to developpers to facilitate their lives but that is not the norm for any Win or posix computer.

                    Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                    A 1 Reply Last reply
                    0
                    • G Guirec

                      that is definitely not the case. but a proficient programmer is anyway testing is code and just don't rely on compilation, right?

                      Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                      D Offline
                      D Offline
                      Dave Calkins
                      wrote on last edited by
                      #36

                      always testing your code is a good thing. it doesn't remove the benefit of compile time checking provided by strongly typed languages though. i.e. regardless of how much runtime testing you do, and/or how proficient you are, there's still a benefit to be had from also having compile time checking.

                      G 1 Reply Last reply
                      0
                      • G Guirec

                        Strongly typing has one big advantage: it will force you to grow from a jerk to a proficient programmer. Yes, many programmers never get proficient but then strongly typing is not the cause :-) But here we are: when you are proficient in your domain of expertise (eg: embedded, gaming, LOB apps, multi-million users websites or whatever is your mod) then strongly typing is just a pain... It only multiplies by X (I am curious here... anyone? ) the number of reserved keywords you have to type to get to an equivalent result that you would get with a dynamic language. What do you guys think?

                        Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                        C Offline
                        C Offline
                        Chris Maunder
                        wrote on last edited by
                        #37

                        Strongly typing is the rubber treading that stops you sliding down that slippery slope of laziness. A more accurate comment is actually: Typing is a tool and needs to be used appropriately. It can save man-hours in finding bugs, and can cost man-hours in hacky work-arounds. We're moving more and more to web services for communication between our systems and to allow loose coupling we're relying extensively on JSON and C# dynamics. Untyped development makes the code simple, elegant and fast to write as well as robust to changes (as long as we catch exceptions), but it means an awful lot of referring to external documentation or external code to check properties and data types, so we lose the instant feedback that is intellisense.

                        cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                        G 1 Reply Last reply
                        0
                        • G Guirec

                          Strongly typing has one big advantage: it will force you to grow from a jerk to a proficient programmer. Yes, many programmers never get proficient but then strongly typing is not the cause :-) But here we are: when you are proficient in your domain of expertise (eg: embedded, gaming, LOB apps, multi-million users websites or whatever is your mod) then strongly typing is just a pain... It only multiplies by X (I am curious here... anyone? ) the number of reserved keywords you have to type to get to an equivalent result that you would get with a dynamic language. What do you guys think?

                          Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

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

                          I like my typing like I like my drinks: strong. :cool: But seriously, I think the only insufficiently-typed languages I've used I'd classify as "scripting languages" -- Perl and DCL come to mind. Such languages have their domain, but I would hesitate to write an actual system in one.

                          1 Reply Last reply
                          0
                          • C Chris Maunder

                            Strongly typing is the rubber treading that stops you sliding down that slippery slope of laziness. A more accurate comment is actually: Typing is a tool and needs to be used appropriately. It can save man-hours in finding bugs, and can cost man-hours in hacky work-arounds. We're moving more and more to web services for communication between our systems and to allow loose coupling we're relying extensively on JSON and C# dynamics. Untyped development makes the code simple, elegant and fast to write as well as robust to changes (as long as we catch exceptions), but it means an awful lot of referring to external documentation or external code to check properties and data types, so we lose the instant feedback that is intellisense.

                            cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

                            G Offline
                            G Offline
                            Guirec
                            wrote on last edited by
                            #39

                            Chris Maunder wrote:

                            it means an awful lot of referring to external documentation or external code

                            1. it looks like an interesting feature to have devs reading some documentation 2. they will read it once or twice and then they will remember. At that point in time you will end-up with "the code simple, elegant and fast to write as well as robust to changes". Isn't it the point?

                            Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                            J 1 Reply Last reply
                            0
                            • D Dave Calkins

                              always testing your code is a good thing. it doesn't remove the benefit of compile time checking provided by strongly typed languages though. i.e. regardless of how much runtime testing you do, and/or how proficient you are, there's still a benefit to be had from also having compile time checking.

                              G Offline
                              G Offline
                              Guirec
                              wrote on last edited by
                              #40

                              I do agree with you but I am at a point where I don't think the benefit outweight the cost....

                              Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                              1 Reply Last reply
                              0
                              • G Guirec

                                Marc Clifton wrote:

                                If you don't like typing, you shouldn't be a programmer.

                                I am a programmer cause I never liked repetitive tasks, I believe that typing .net/java code is highly repetitive... You might think differently: fair enough. But with all respect I am not judging what you should or should not be or do.

                                Marc Clifton wrote:

                                Not to mention that I wouldn't write anything that requires performance in a dynamic language

                                Many dynamic languages outperform statically typed languages... just have a go with LUA you should not be disappointed. And code is not all... the environment has a lot to do: run some compiled C# in IIS and compare performance with interpreted JS in node or run PHP within ligthy and you might end-up handling more than 3000 requests/sec http://redmine.lighttpd.net/projects/lighttpd/wiki/PoweredByLighttpd[^]... Drop me a note when you achieve the same with csharp :-D

                                Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                                J Offline
                                J Offline
                                J Dunlap
                                wrote on last edited by
                                #41

                                Guirec Le Bars wrote:

                                Drop me a note when you achieve the same with csharp :-D

                                Here I am, dropping you a note. C# typically has about 3x the performance of nodejs. But to get >3000 requests/sec you will need to tune both IIS and your ASP.NET settings - or drop to the bare metal like nodejs does anyway. I personally tested this using HttpListener and C#'s async features, but there are libraries out there as well to do this. I got over 10,000 requests per second on a good server machine.

                                G 1 Reply Last reply
                                0
                                • G Guirec

                                  Matthew Faithfull wrote:

                                  the stability/lifetime/readability

                                  stability : hhmmmm... what's that? as soon as you change a line of code somewhere some sort of instability appears right? and if you don't change anything then dynamic is as stable as strongly typed... lifetime: with a new version of the .net framework every year which, each time, brings more syntactic sugar (anonymous delegate, initializers, linq, etc...) then the code written today is extremely different from the one wrote a few years ago. It seems to me that there is less of a trend/fashion style for dynamic languages devs. readability: once again this is related to your seniority level I think. It is pretty easy to write unredable code in .Net/Java.

                                  Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                                  M Offline
                                  M Offline
                                  Matthew Faithfull
                                  wrote on last edited by
                                  #42

                                  Guirec Le Bars wrote:

                                  if you don't change anything then dynamic is as stable as strongly typed

                                  No because you don't need to change anything for a new version of Python to break your code because they tidied up vague rules for under the hood type conversion that you can't control through the language itself. As to .Net and Java what you say is true which is why I'll stick with a strong and statically typed language like C++ given the choice.

                                  "The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)

                                  1 Reply Last reply
                                  0
                                  • G Guirec

                                    I do actually :suss:

                                    Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                                    L Offline
                                    L Offline
                                    Lost User
                                    wrote on last edited by
                                    #43

                                    Aah, never miss the times running into an "m_intFoosBar" that contained a string.

                                    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                                    1 Reply Last reply
                                    0
                                    • J J Dunlap

                                      Guirec Le Bars wrote:

                                      Drop me a note when you achieve the same with csharp :-D

                                      Here I am, dropping you a note. C# typically has about 3x the performance of nodejs. But to get >3000 requests/sec you will need to tune both IIS and your ASP.NET settings - or drop to the bare metal like nodejs does anyway. I personally tested this using HttpListener and C#'s async features, but there are libraries out there as well to do this. I got over 10,000 requests per second on a good server machine.

                                      G Offline
                                      G Offline
                                      Guirec
                                      wrote on last edited by
                                      #44

                                      Was that a test which was 'really' doing something like generate some content and write it to the response stream or was it just returning a ok/200 ? I might actually be interested in your codebase if you want to share. The 3000 req/sec I am talking about are real dynamic websites running on production, so they obviously have content.

                                      Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                                      1 Reply Last reply
                                      0
                                      • G Guirec

                                        Easy? if you say so... IMHO, asp.net can't handle 3000 requests per second. Even if you remove every single HttpModule and just stick to a very basic HttpHandler....

                                        Andy Brummer wrote:

                                        Asp.net has had asyncronous handlers for years

                                        hopefully... at OS level everything is asynchronous by nature. Synchronicity has been brought to developpers to facilitate their lives but that is not the norm for any Win or posix computer.

                                        Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                                        A Offline
                                        A Offline
                                        Andy Brummer
                                        wrote on last edited by
                                        #45

                                        Anyway, it's the architectural change in node and nginx that lets it scale to really high levels. Any of the platforms these days can get that kind of performance if you know what you are doing. It's more about developer experience and knowing how to take advantage of the platform than the platform itself. If you wanted to, you could drop back down to straight C++ and hook into the same low level http apis that IIS uses and crush the performance of just about anything else out there. Or you could do the same in Linux and beat the pants off node. Anyway I've worked on a web service that saturated the network at 6000-7000 req/sec and used 18Gigs of memory to predict fraud in advertising clickstreams. The cut off response time was 200ms, the service averaged under 1ms even when it was getting hammered. That was over 3 years ago on a relatively low end 2 proc VM. I never really got to the point of really tuning it, but I'm sure there was a lot more it could have done.

                                        Curvature of the Mind now with 3D

                                        1 Reply Last reply
                                        0
                                        • G Guirec

                                          Strongly typing has one big advantage: it will force you to grow from a jerk to a proficient programmer. Yes, many programmers never get proficient but then strongly typing is not the cause :-) But here we are: when you are proficient in your domain of expertise (eg: embedded, gaming, LOB apps, multi-million users websites or whatever is your mod) then strongly typing is just a pain... It only multiplies by X (I am curious here... anyone? ) the number of reserved keywords you have to type to get to an equivalent result that you would get with a dynamic language. What do you guys think?

                                          Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^] Joe never complained of anything but ever did his duty in his way of life, with a strong hand, a quiet tongue, and a gentle heart [^]

                                          J Offline
                                          J Offline
                                          jschell
                                          wrote on last edited by
                                          #46

                                          Guirec Le Bars wrote:

                                          What do you guys think?

                                          It isn't significant so it doesn't matter.

                                          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