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 Offline
    G Offline
    Guirec
    wrote on last edited by
    #1

    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 [^]

    A OriginalGriffO B D L 21 Replies 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 [^]

      A Offline
      A Offline
      AlphaDeltaTheta
      wrote on last edited by
      #2

      Mix the two... go for C#

      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 [^]

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        I prefer strongly typed - it catches problems at compile time instead of run time.

        The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        1 Reply Last reply
        0
        • A AlphaDeltaTheta

          Mix the two... go for C#

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

          In real-life I am pro consensus but in software programming I like to avoid non-firm-decisions as much as I can. For me it is one XOr the other...

          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 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 [^]

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

            Strong typing is a good thing. A mistake you make with types in a weakly typed language will result in something unexpected happening at runtime, and having the compiler catch your mistakes is a big bonus. However, programming languages are often rather cumbersome at defining the types, requiring you to do so when it's clear from the context. E.g. I have some Java code on my screen containing

            for(Model model : models){
            List<String> customProperties = model.getCustomProperties();
            // ... do stuff
            }

            Neither of those two type declarations is necessary because they are inferrable from the context (i.e. the return type of getCustomProperties and the iterator type of models), and making you type them is an increase in typing for little benefit. C# has gone down the road of removing this with var and with lambda functions (which infer their argument and result types from their context).

            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 [^]

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

              Guirec Le Bars wrote:

              What do you guys think?

              Apps Hungarian. You must love it.

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

              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 [^]

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

                Strongly typed lets the compiler catch mistakes. Are you saying a "proficient" programmer never makes mistakes and so doesn't benefit from a strongly typed language? I don't think that's the case.

                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 [^]

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

                  I'm still reserving judgement. As you say, often it takes more typing. I'm also not entirely convinced by the "prevents bugs"-argument - strong typing isn't really strong enough for that, you'd need something based on abstract interpretation to catch actual bugs (ok so strong typing prevents me from, say, using an int as if it was an array, but it's not like I ever do that anyway). It catches a typo now and then.. but not all That often, so it's still a trade-off, not a clear-cut win for either side. Most things that are actually wrong are logic errors etc. Strong typing is of little to no help there. However, despite recent advances, I'm not convinced that dynamic languages can ever be fast. The source doesn't give them enough easily-extractable information. In fact, neither do strongly typed languages, but it's still more. What should it look like then? I'm not certain yet. I'm exploring (ie making compilers for new languages and seeing how well they work) in the direction of making as much as possible a compile-time error. Things like dereferencing null and accessing an array outside of its bounds. Either abstract interpretation finds that due to the flow of your program it cannot possibly happen, or you have to explicitly write, for example, "assume x != null" or put a "where x != null" as precondition on the method declaration. By dereferencing x you were always making that assumption, but now it's explicit and obvious. The interprocedural analysis required to prevent a metric ton of false-positives is making it a little hard. Just an experiment of course, failure is always an option :)

                  1 Reply Last reply
                  0
                  • D Dave Calkins

                    Strongly typed lets the compiler catch mistakes. Are you saying a "proficient" programmer never makes mistakes and so doesn't benefit from a strongly typed language? I don't think that's the case.

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

                    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 [^]

                    F D H 3 Replies 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
                      jim lahey
                      wrote on last edited by
                      #10

                      Complaining about having to write a little more code to be genuinely strongly typed is not a valid reason for using dynamic over strong typing. Look at how equality operators in PHP work, or don't work if we're being totally honest.. I'd rather incur a little more overhead in having to properly declare everything than spend the same time sifting through code written in what is essentially still a procedural language, desperately trying to find out why my if(a == b) isn't working like it should.

                      G 1 Reply Last reply
                      0
                      • L Lost User

                        Guirec Le Bars wrote:

                        What do you guys think?

                        Apps Hungarian. You must love it.

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

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

                        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 1 Reply Last reply
                        0
                        • J jim lahey

                          Complaining about having to write a little more code to be genuinely strongly typed is not a valid reason for using dynamic over strong typing. Look at how equality operators in PHP work, or don't work if we're being totally honest.. I'd rather incur a little more overhead in having to properly declare everything than spend the same time sifting through code written in what is essentially still a procedural language, desperately trying to find out why my if(a == b) isn't working like it should.

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

                          (a==b) is nothing I would personally write in a dynamic language...

                          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

                            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 [^]

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

                            I prefer strong typing. I'm happy for those who don't to do their thing without it in JavaScript or WhateverLang(TM) at a minimum safe distance of two parsecs from me. When they do however and then have no idea why their function produces the correct result only on even numbered days of the week don't expect me to come to the rescue, I'm out of distress call range. Yes they will be 'code complete' before I will and yes they will almost certainly write more lines of code per day. However when I have debugged through the use cases for my code I will KNOW that it works and will remain working barring an act of God or at least RMS. The same cannot be said for the script kiddies with their fingers crossed sweating the Q.A. results. ;)

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

                            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 [^]

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

                              There is a difference between strong-typing and static typing and I am in favor of both by a wide-margin. Although, I am quite the Javascript Kiddie.

                              Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost "All users always want Excel" --Ennis Lynch

                              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 [^]

                                F Offline
                                F Offline
                                Freak30
                                wrote on last edited by
                                #15

                                And what if the proficient programmer misses one of the code paths during his tests? The compiler will surely check them all.

                                G J 2 Replies Last reply
                                0
                                • G Guirec

                                  In real-life I am pro consensus but in software programming I like to avoid non-firm-decisions as much as I can. For me it is one XOr the other...

                                  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
                                  lewax00
                                  wrote on last edited by
                                  #16

                                  Programming != Real Life ? ;P

                                  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 [^]

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

                                    Guirec Le Bars wrote:

                                    you have to type

                                    I often hear complaints about how much typing someone has to do. If you don't like typing, you shouldn't be a programmer. As to dynamic typing, while it's cool and fun, in the long run, the number of problems that I've had to fix that simply wouldn't be there in a strongly typed language all but eliminates for me the benefits. Not to mention that I wouldn't write anything that requires performance in a dynamic language, as these usually cannot be compiled into native assembly code but are either interpreted or are run in a VM. So I'll say it again, but this time metaphorically: If you don't like typing, you shouldn't be a programmer. Marc

                                    Testers Wanted!
                                    Latest Article: User Authentication on Ruby on Rails - the definitive how to
                                    My Blog

                                    G J 2 Replies Last reply
                                    0
                                    • F Freak30

                                      And what if the proficient programmer misses one of the code paths during his tests? The compiler will surely check them all.

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

                                      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 S 2 Replies Last reply
                                      0
                                      • M Matthew Faithfull

                                        I prefer strong typing. I'm happy for those who don't to do their thing without it in JavaScript or WhateverLang(TM) at a minimum safe distance of two parsecs from me. When they do however and then have no idea why their function produces the correct result only on even numbered days of the week don't expect me to come to the rescue, I'm out of distress call range. Yes they will be 'code complete' before I will and yes they will almost certainly write more lines of code per day. However when I have debugged through the use cases for my code I will KNOW that it works and will remain working barring an act of God or at least RMS. The same cannot be said for the script kiddies with their fingers crossed sweating the Q.A. results. ;)

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

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

                                        Matthew Faithfull wrote:

                                        the script kiddies

                                        I am not sure you get me right... I am talking about experienced programmers not kiddies.

                                        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 1 Reply Last reply
                                        0
                                        • G Guirec

                                          Matthew Faithfull wrote:

                                          the script kiddies

                                          I am not sure you get me right... I am talking about experienced programmers not kiddies.

                                          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
                                          #20

                                          My point is that experienced programmers don't use 'dynamically' typed languages unless they have to because experience teaches them that it's a bad idea. It doesn't seem like a bad idea at first because it's 'easy' but when you look back at the amount of time spent debugging and the stability/lifetime/readability of the code never mind the quality of the tools available to debug it JavaScript, Python, PHP and all their unholy offspring should have been drowned at birth.

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

                                          G 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