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. I knew i was suspicious of python for a reason

I knew i was suspicious of python for a reason

Scheduled Pinned Locked Moved The Lounge
csharppythonrubyquestion
28 Posts 17 Posters 36 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.
  • H honey the codewitch

    The grammar for python is ridiculous to me. Significant whitespace being the leading cause of my WTF. But I just taught myself python so i could try out some particular python code in C# I'm looking through some examples and i find this gem:

    multiple = 1024 if a_kilobyte_is_1024_bytes else 1000

    Which presumably means

    var multiple = (a_kilobyte_is_1024_bytes)?1024:1000;

    WTF and then there's pass. Pass seems like it should never exist in any language. That is all.

    Real programmers use butterflies

    P Offline
    P Offline
    patbob
    wrote on last edited by
    #21

    I don't get the hate on python. It's a typical 1980s language. It is what it is because it's a product of the time it was invented in. You can't apply today's values to a language whose syntax was designed almost 40 years ago and expect it to hold up. Yeah, I know C was around back then, and is the dominant syntax today, but back then, C didn't have much penetration and Fortran was king. Python is kind of an ugly stepchild of Fortran, and shows it.

    I live in Oregon, and I'm an engineer.

    H F 2 Replies Last reply
    0
    • P patbob

      I don't get the hate on python. It's a typical 1980s language. It is what it is because it's a product of the time it was invented in. You can't apply today's values to a language whose syntax was designed almost 40 years ago and expect it to hold up. Yeah, I know C was around back then, and is the dominant syntax today, but back then, C didn't have much penetration and Fortran was king. Python is kind of an ugly stepchild of Fortran, and shows it.

      I live in Oregon, and I'm an engineer.

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

      patbob wrote:

      Python is kind of an ugly stepchild of Fortran

      The explains a lot. Honestly, I didn't know Python was that old. However, significant whitespace there's really no excuse for in any language, as the problems with it - both lexing it and using it - were pretty well known by the 1980s, AFAIK. :sigh: That's why i'll never adopt it. Half my editors won't even work with it very well. (tabs to spaces can easily kill a python program)

      Real programmers use butterflies

      F 1 Reply Last reply
      0
      • H honey the codewitch

        patbob wrote:

        Python is kind of an ugly stepchild of Fortran

        The explains a lot. Honestly, I didn't know Python was that old. However, significant whitespace there's really no excuse for in any language, as the problems with it - both lexing it and using it - were pretty well known by the 1980s, AFAIK. :sigh: That's why i'll never adopt it. Half my editors won't even work with it very well. (tabs to spaces can easily kill a python program)

        Real programmers use butterflies

        F Offline
        F Offline
        Frank Malcolm
        wrote on last edited by
        #23

        Fortran didn't require any whitespace. If you were parsing DO2I=1 you might have an assignment statement or, if the next symbol was a comma, a DO loop. How about DO2INUMBR(JPARM1,KPARM2,LPARM3)=LRESLT(MINDEX,INDEX2,INDEX3) You still don't yet know if it's a DO loop or an assignment!

        H 1 Reply Last reply
        0
        • F Frank Malcolm

          Fortran didn't require any whitespace. If you were parsing DO2I=1 you might have an assignment statement or, if the next symbol was a comma, a DO loop. How about DO2INUMBR(JPARM1,KPARM2,LPARM3)=LRESLT(MINDEX,INDEX2,INDEX3) You still don't yet know if it's a DO loop or an assignment!

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

          *cries*

          Real programmers use butterflies

          1 Reply Last reply
          0
          • C Chris Maunder

            I always feel dirty when there's the need to do that. I usually just unravel the loop construct so there's a loop body.

            cheers Chris Maunder

            G Offline
            G Offline
            Gary R Wheeler
            wrote on last edited by
            #25

            Same here. I have an inherent distrust of while loops with more than 3 or so condition expressions, and I despise for loops with termination conditions that are unrelated to the iteration.

            Software Zen: delete this;

            1 Reply Last reply
            0
            • P Peter Shaw

              HA HA HA.... Excellent. COBOL 2 point O What goes around, comes around.

              G Offline
              G Offline
              Gary R Wheeler
              wrote on last edited by
              #26

              Peter Shaw wrote:

              COBOL 2 point O

              One of my claims to fame is that I've successfully avoided learning COBOL, even though a couple of my positions had me skidding really close to it. I seem to remember one of the [dis]honorable mentions in the Obfuscated C/C++ Contest was a header file that let you write 'C' in a form closely resembling COBOL. As I recall, it was voted "Worst Abuse of the Preprocessor" that year.

              Software Zen: delete this;

              P 1 Reply Last reply
              0
              • G Gary R Wheeler

                Peter Shaw wrote:

                COBOL 2 point O

                One of my claims to fame is that I've successfully avoided learning COBOL, even though a couple of my positions had me skidding really close to it. I seem to remember one of the [dis]honorable mentions in the Obfuscated C/C++ Contest was a header file that let you write 'C' in a form closely resembling COBOL. As I recall, it was voted "Worst Abuse of the Preprocessor" that year.

                Software Zen: delete this;

                P Offline
                P Offline
                Peter Shaw
                wrote on last edited by
                #27

                Unfortunately it was pushed upon me with great vigor during my University Years. One of my programming teachers was an ex British Telecom COBOL programmer (Where talking 1994 ish here) and she was absolutely rabid about the virtues of the language. She used to fail assignments for stupid things like putting 2 spaces in a comment line where there should only have been one, she treat code layout and formatting like it was a fashion statement and refused to even mention the names of any other languages. Thankfully, the "digital electronics" parts of my studies covered C/C++ and my accountancy part had some Pascal parts... so that stopped me from going insane :-)

                1 Reply Last reply
                0
                • P patbob

                  I don't get the hate on python. It's a typical 1980s language. It is what it is because it's a product of the time it was invented in. You can't apply today's values to a language whose syntax was designed almost 40 years ago and expect it to hold up. Yeah, I know C was around back then, and is the dominant syntax today, but back then, C didn't have much penetration and Fortran was king. Python is kind of an ugly stepchild of Fortran, and shows it.

                  I live in Oregon, and I'm an engineer.

                  F Offline
                  F Offline
                  FormerBIOSGuy
                  wrote on last edited by
                  #28

                  AWK was invented in the 70s. Its basic structure has been around from the beginning, and it is as elegant today as it was back in the day. Need to process a text file in some way? Use AWK (GAWK) to do it and you can spend your time thinking about what it is you want to do with the file's contents. You need to spend no time thinking about or writing code to open the file, read its contents, or break it into meaningful tokens--AWK does it all for you. ;)

                  FormerBIOSGuy

                  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