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. python - tail stuck under the rocks?

python - tail stuck under the rocks?

Scheduled Pinned Locked Moved The Lounge
helppythonbusinesstutorialquestion
38 Posts 18 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.
  • L Lost User

    OriginalGriff wrote:

    Python's version is worse

    I agree, but you can still do quite a bit of damage with var.

    OriginalGriff wrote:

    Strongly typed variables should be mandatory in all languages used in the 21st century!

    That is definitely true; but will teachers explain that properly to their students?

    Sander RosselS Offline
    Sander RosselS Offline
    Sander Rossel
    wrote on last edited by
    #14

    Richard MacCutchan wrote:

    I agree, but you can still do quite a bit of damage with var.

    In what language? JavaScript? Certainly, but JavaScript doesn't really get much better than that... In C# it's still a typed variable, so it's exactly the same thing as explicitly using the type name except instead of the type name you use var. So no damage there, except to readability.

    Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

    F 1 Reply Last reply
    0
    • R r_hyde

      But a `var` (as in C#, say) isn't at all the same thing as an untyped (or rather, dynamically-typed) variable (as in Python). When you write `var x = 5;`, `x` is still an `int` just the same as if you'd written `int x = 5;`, you're just helping yourself save some keystrokes and letting the compiler infer the type (ok, you're not saving any keystrokes in that example, but not every type name is as succinct as `int` ;P ). You can't then turn around and write `x = "snuggles";` or the compiler will throw a fit, unlike Python where it would be perfectly legal. More and more people might be using `var`, but let's not confuse that with "no one will be using proper typed variables any more!"

      Sander RosselS Offline
      Sander RosselS Offline
      Sander Rossel
      wrote on last edited by
      #15

      Dictionary<string, IEnumerable<IEnumerable<SomeValue>>> valuesPerLineFromACsvFileByKey = new Dictionary<string, IEnumerable<IEnumerable<SomeValue>>>();

      or:

      var valuesPerLineFromACsvFileByKey = new Dictionary<string, IEnumerable<IEnumerable<SomeValue>>>();

      :D

      Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

      1 Reply Last reply
      0
      • N Nand32

        Okay, that was an analogy. I was trying a little piece of Python code. Got a bit surprised with the "positional"-indentation requirements in code. Just like how it used to be in older programming languages like Cobol. (I'm not sure if any other recent programming languages enforce these) For example,

        If x is a:
        do //indented & works

        is different from

        if x is a:
        do //Non-indented & throws error

        It's funny, and doesn't this sound rudimentary and a bit annoying? :)

        Sander RosselS Offline
        Sander RosselS Offline
        Sander Rossel
        wrote on last edited by
        #16

        I know Haskell has it too. I know, because I had a school assignment that I've been looking at for two hours because I mixed up a few spaces with a tab... X|

        if x is a:
        do //...

        Isn't the same as:

        if x is a:
        do //...

        :rolleyes: It does produce some really clean and concise code though!

        Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

        1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          There is also the "Extra quote character": ''' which looks just like the ones around it, but will not compile in other peoples code - not that you would replace any, I'm sure ... :laugh:

          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

          D Offline
          D Offline
          David ONeil
          wrote on last edited by
          #17

          OriginalGriff wrote:

          - not that you would replace any, I'm sure

          If I wasn't using a strongly-typed language, and had an asshole for a coworker that needed a lesson, I certainly would! Send him a copy in which a variable has unicode changes but looks the same: "It works for me, I can't understand why you are having problems!" :rolleyes: :rolleyes: :rolleyes:

          The forgotten roots of science | C++ Programming | DWinLib

          1 Reply Last reply
          0
          • N Nand32

            Okay, that was an analogy. I was trying a little piece of Python code. Got a bit surprised with the "positional"-indentation requirements in code. Just like how it used to be in older programming languages like Cobol. (I'm not sure if any other recent programming languages enforce these) For example,

            If x is a:
            do //indented & works

            is different from

            if x is a:
            do //Non-indented & throws error

            It's funny, and doesn't this sound rudimentary and a bit annoying? :)

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

            I started looking at Python in my home hobby time around 6 months ago and while it is a bit strange at first, I now find the indentation makes the code easier to read without brackets. I know IDEs allow you to indent bracketed languages but I find that Python easier to read. If you find the indentation strange, wait until you get on to the coding standards where lines should not exceed 79 characters in length.

            “That which can be asserted without evidence, can be dismissed without evidence.”

            ― Christopher Hitchens

            1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              Oh, no, no, no, no! Python's version is worse: you don't need to declare the variable using "var", or "Dim", or anything - just pick a name and assign a value. So if you misspell it ... that's a new variable. Just like FORTRAN was back in the day (1977). And that caused a probe to miss the planet Venus completely, so what it does in a banking app, or a Boeing 737 Max is not something you want to think about too hard, really. Strongly typed variables should be mandatory in all languages used in the 21st century!

              Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

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

              Which is why I see Python as a poor choice for teaching beginners to 'code'. Take this class definition containing a function:

              class StringFormat(object):

              @staticmethod
              def FloatToStringFormat(num: float, decimalPlaces: int) -> str:
                  return "{:.{}f}".format(num, decimalPlaces)
              

              Calling it like this:

              resultAsString = StringFormat.FloatToStringFormat(20.123, "2")

              I would expect to get an error as I am passing in a string rather than an integer for decimalPlaces. But no, Python happily sets resultAsString to "20.12"

              “That which can be asserted without evidence, can be dismissed without evidence.”

              ― Christopher Hitchens

              M 1 Reply Last reply
              0
              • G GuyThiebaut

                Which is why I see Python as a poor choice for teaching beginners to 'code'. Take this class definition containing a function:

                class StringFormat(object):

                @staticmethod
                def FloatToStringFormat(num: float, decimalPlaces: int) -> str:
                    return "{:.{}f}".format(num, decimalPlaces)
                

                Calling it like this:

                resultAsString = StringFormat.FloatToStringFormat(20.123, "2")

                I would expect to get an error as I am passing in a string rather than an integer for decimalPlaces. But no, Python happily sets resultAsString to "20.12"

                “That which can be asserted without evidence, can be dismissed without evidence.”

                ― Christopher Hitchens

                M Offline
                M Offline
                Mike Winiberg
                wrote on last edited by
                #20

                It's interesting to see in this discussion that one of python's more attractive features is seen as a disadvantage 8) Once again, the debate here about whether the language is 'good' or not seems to have nothing to do with whether it actually is good or otherwise, but simply amounts to 'does it fit my idea of how a language should work'. If I've learnt anything from over 40 years of software development, it is that (with a few domain specific exceptions) the skill of writing good software - don't mistake me here, I'm not saying that I write good software! - has almost nothing to do with the language you write it in, and everything to do with domain knowledge and the skill of the programmer(s). Every language has rules; every language has flaws. Being aware of both and using/avoiding them so you produce good code is what it's all about. The behaviour cited above as being 'problematic' is exactly why I use Python for certain types of project. 8)

                G 1 Reply Last reply
                0
                • M Mike Winiberg

                  It's interesting to see in this discussion that one of python's more attractive features is seen as a disadvantage 8) Once again, the debate here about whether the language is 'good' or not seems to have nothing to do with whether it actually is good or otherwise, but simply amounts to 'does it fit my idea of how a language should work'. If I've learnt anything from over 40 years of software development, it is that (with a few domain specific exceptions) the skill of writing good software - don't mistake me here, I'm not saying that I write good software! - has almost nothing to do with the language you write it in, and everything to do with domain knowledge and the skill of the programmer(s). Every language has rules; every language has flaws. Being aware of both and using/avoiding them so you produce good code is what it's all about. The behaviour cited above as being 'problematic' is exactly why I use Python for certain types of project. 8)

                  G Offline
                  G Offline
                  GuyThiebaut
                  wrote on last edited by
                  #21

                  Mike Winiberg wrote:

                  has almost nothing to do with the language you write it in, and everything to do with domain knowledge and the skill of the programmer(s).

                  I agree. I am glad you used the word "almost", because using Windows batch scripting for some devops work I have been doing has resulted in me having to work around the language and do things in a manner that I would not see as particularly elegant. Of course I could rewrite it with powershell scripting, which is on my list, but when you are working on systems that are business critical - doing a large code refactor is not always possible largely due to the cost to the business.

                  “That which can be asserted without evidence, can be dismissed without evidence.”

                  ― Christopher Hitchens

                  M 1 Reply Last reply
                  0
                  • G GuyThiebaut

                    Mike Winiberg wrote:

                    has almost nothing to do with the language you write it in, and everything to do with domain knowledge and the skill of the programmer(s).

                    I agree. I am glad you used the word "almost", because using Windows batch scripting for some devops work I have been doing has resulted in me having to work around the language and do things in a manner that I would not see as particularly elegant. Of course I could rewrite it with powershell scripting, which is on my list, but when you are working on systems that are business critical - doing a large code refactor is not always possible largely due to the cost to the business.

                    “That which can be asserted without evidence, can be dismissed without evidence.”

                    ― Christopher Hitchens

                    M Offline
                    M Offline
                    Mike Winiberg
                    wrote on last edited by
                    #22

                    Oh yes, I was careful to say "almost"! 8) It never ceases to amaze me how complex a process could be constructed with DOS batch scripts - often by relying on obscure side-effects of small .COM files etc. I've always liked Powershell (although I rarely use it!) because it seemed a genuine attempt to provide a full batch environment for windows with 'proper' controlled access to the entire system. I do find the verbosity of the naming convention somewhat off-putting though (as indeed is the case for some other languages) - ridiculously long and complex variable names can be as difficult to manage as i, ii, iii and iiii etc! (I once spent over a day hunting down a bug in some C++ code where a stupidly long descriptive variable name had been used in multiple places with two different internal spellings via a macro such that the compiler didn't 'notice' the variants!)

                    1 Reply Last reply
                    0
                    • Sander RosselS Sander Rossel

                      Richard MacCutchan wrote:

                      I agree, but you can still do quite a bit of damage with var.

                      In what language? JavaScript? Certainly, but JavaScript doesn't really get much better than that... In C# it's still a typed variable, so it's exactly the same thing as explicitly using the type name except instead of the type name you use var. So no damage there, except to readability.

                      Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

                      F Offline
                      F Offline
                      Fueled By Decaff
                      wrote on last edited by
                      #23

                      C#

                      var elapsedTime = stopwatch.ElapsedMilliseconds;
                      var processedCount = GetProcessedCount();
                      var processedPerSecond = processedCount / elapsedTime * 1000;

                      Spot the bug.

                      Sander RosselS 1 Reply Last reply
                      0
                      • F Fueled By Decaff

                        C#

                        var elapsedTime = stopwatch.ElapsedMilliseconds;
                        var processedCount = GetProcessedCount();
                        var processedPerSecond = processedCount / elapsedTime * 1000;

                        Spot the bug.

                        Sander RosselS Offline
                        Sander RosselS Offline
                        Sander Rossel
                        wrote on last edited by
                        #24

                        Fueled By Caffeine wrote:

                        var processedPerSecond = processedCount / elapsedTime * 1000;

                        Probably there, you get an int instead of a decimal? However, changing var to decimal will still result in a wrong output as an int is silently cast to a decimal, but that doesn't change outcome of the divide operation. The fix I think you're looking for is:

                        var processedPerSecond = (decimal)processedCount / elapsedTime * 1000;

                        Now here is a fun bug, which I've seen go wrong multiple times...

                        var query = databaseContext.SomeTable;
                        query = query.Where(x => x.SomeBoolLimitingTheResultFromThousandsToTens);
                        return query.ToList();

                        In this piece of code the query variable is of type IQueryable. That means the Where that is executed is actually Queryable.Where(IQueryable, Expression). The actual database call, with WHERE clause, is executed on the ToList method (or more precise, in the Enumerator). Now someone comes and changes the code, the first line becomes var query = databaseContext.SomeTable.ToList(); Suddenly, the type of query has changed to IEnumerable! The database query WITHOUT the WHERE clause is executed and Enumerable.Where(IEnumerable, Func) is executed to filter the collection in-memory. You now get thousands of records instead of tens, while the in-memory Where is probably more expensive than the database WHERE. All in all a nice performance hit... That is actually the only bug I've ever encountered while working with var, and it's pretty specific. And the only reason it goes wrong is because IQueryable and IEnumerable have pretty much the same extension methods, save for Expression and Func, but a Func can be implicitly cast to an Expression. Fun times :)

                        Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript

                        1 Reply Last reply
                        0
                        • L Lost User

                          OriginalGriff wrote:

                          just pick a name and assign a value. So if you misspell it ... that's a new variable

                          but how do you misspell "i"

                          Message Signature (Click to edit ->)

                          K Offline
                          K Offline
                          kalberts
                          wrote on last edited by
                          #25

                          lopatir wrote:

                          but how do you misspell "i"

                          Right. That cost me a couple days of work, in the days when Fortran, as well as hardcopy code, were still around. (Yes I know there are languages called Fortran today, but they look completely different!). The loop went trhough once (as Fortran always does), but wouldn't repeat. I didn't discover the problem until I sat down with a printout of the disassebled binary code. Fortunately, the disassembler made use of the symbol defintions in the debug info, and fortunately, the printer (as opposed to the screen) used serif fonts. Then I could distinguish an "l" from an "I", so a conditional jump out of the loop used a diferent variable from the intended one. There are several such "false friends". I should have known, because in my student days, one of my friends who was a TA in the elementary Fortran programming class caused and "incident": The professor insisted on Norwegian variable names, so instead of "QUEUE" the variable should be named "KØ". "Ø" isn't recognized in Fortran, but ø is commonly transcribed to English as oe, which makes it "K0E". Because we have Ø as a letter, we do not slash zeroes here. Depending on the typeface, KOE and K0E may look almost perfectly identical. They did on our screens. When Jon discovered, he exclaimed loudly so that everybody around could hear hear it to the very good-looking, 18 year old female freshman: "Look, here you are not saying k-oh-e, you are saying k-null-e!" Zero is "null" in Norwegian and "knulle" means f**k... Jon didn't realize was he was "suggesting" until the word had been pronounced, and he got so ashamed that he wanted to flee away. But the girl did accept his excuses. Actually, it doesn't take national characters, like ø, to confuse 0 and O - even in English-speaking environments, non-slashed zeroes are common. Some typeface do not distinguish much between 1 and l either - I have seen troubles caused by that pair as well.

                          D 1 Reply Last reply
                          0
                          • N Nand32

                            Okay, that was an analogy. I was trying a little piece of Python code. Got a bit surprised with the "positional"-indentation requirements in code. Just like how it used to be in older programming languages like Cobol. (I'm not sure if any other recent programming languages enforce these) For example,

                            If x is a:
                            do //indented & works

                            is different from

                            if x is a:
                            do //Non-indented & throws error

                            It's funny, and doesn't this sound rudimentary and a bit annoying? :)

                            K Offline
                            K Offline
                            kalberts
                            wrote on last edited by
                            #26

                            I my days, when C squeezed out Pascal, one argument you could frequenty hear in favor of C was "There's so much typing in Pascal! In C, you can just use {}, and don't need those BEGINs and ENDs. You don't need to write FUNCTION or PROCEDURE, and so on". So we threw out a well designed, fairly safe language in favor of a "you asked for it, you got it" language, to save a few keystrokes. To some people that wasn't enough; even braces required keystrokes (even shifted ones, on most keyboards). Let's get rid of those! And we got Python. If you really want to save keystrokes, why don't you go for APL? Other crazy ways of saving keystrokes is to insist on using tabs rather than spaces, sometimes with semantic significance. (No, I am not talking about Whitespace, but seriously meant file formats.) Obligatory Geek & Poke[^]. You may argue that keywords do not reduce complexity - but it does help you to understand that this closes the while loop, that closes the method definition, and there is the end of the class definition. Besides, distinct keywords help the compiler back on the track after an error, and facilitates much more meaningful error messages.

                            1 Reply Last reply
                            0
                            • N Nand32

                              Okay, that was an analogy. I was trying a little piece of Python code. Got a bit surprised with the "positional"-indentation requirements in code. Just like how it used to be in older programming languages like Cobol. (I'm not sure if any other recent programming languages enforce these) For example,

                              If x is a:
                              do //indented & works

                              is different from

                              if x is a:
                              do //Non-indented & throws error

                              It's funny, and doesn't this sound rudimentary and a bit annoying? :)

                              K Offline
                              K Offline
                              kalberts
                              wrote on last edited by
                              #27

                              Cobol - and Fortran - didn't interpret indents semantically. The coding sheet (or individual line, for those who never saw a coding sheet) was divided into column (or fields of the line), with different functions: Label, line continuation marker, structure level markers, line sequence number etc. This was defined by the column (/field): Within the main field, you could indent or not without changing the semantics. The coding sheets had heavy lines separating the columns; you never misplaced any element accidentally. So even though positioning (in one column, or another column) was significant, it wasn't quite like Python but far more controlled and well defined, and it was very difficult to make mistakes that could pass by without being detected. Those languages had far worse defects ... :-)

                              1 Reply Last reply
                              0
                              • N Nand32

                                Okay, that was an analogy. I was trying a little piece of Python code. Got a bit surprised with the "positional"-indentation requirements in code. Just like how it used to be in older programming languages like Cobol. (I'm not sure if any other recent programming languages enforce these) For example,

                                If x is a:
                                do //indented & works

                                is different from

                                if x is a:
                                do //Non-indented & throws error

                                It's funny, and doesn't this sound rudimentary and a bit annoying? :)

                                M Offline
                                M Offline
                                Member 7878116
                                wrote on last edited by
                                #28

                                The indentation is part of Python, take it or leave it. Where it really gets annoying is when you try to cut'n'paste snippets. 8 space characters does not equal 1 tab. I use Vim with a tab equivalent to 2 spaces for real confusion.

                                1 Reply Last reply
                                0
                                • N Nand32

                                  Okay, that was an analogy. I was trying a little piece of Python code. Got a bit surprised with the "positional"-indentation requirements in code. Just like how it used to be in older programming languages like Cobol. (I'm not sure if any other recent programming languages enforce these) For example,

                                  If x is a:
                                  do //indented & works

                                  is different from

                                  if x is a:
                                  do //Non-indented & throws error

                                  It's funny, and doesn't this sound rudimentary and a bit annoying? :)

                                  A Offline
                                  A Offline
                                  Asday
                                  wrote on last edited by
                                  #29

                                  Man, us "Pythonistas" are getting tired of this criticism. Do you indent your C? Of course you do, it's impossible to read poorly indented code. Does your C compiler whinge at you when you forget curly brackets? Of course it does, they define blocks. Except, you're already defining blocks for human eyes with indentation. Why do you also need to define them for machine eyes with curly brackets? Source code is for humans, not machines.

                                  K 1 Reply Last reply
                                  0
                                  • N Nand32

                                    Okay, that was an analogy. I was trying a little piece of Python code. Got a bit surprised with the "positional"-indentation requirements in code. Just like how it used to be in older programming languages like Cobol. (I'm not sure if any other recent programming languages enforce these) For example,

                                    If x is a:
                                    do //indented & works

                                    is different from

                                    if x is a:
                                    do //Non-indented & throws error

                                    It's funny, and doesn't this sound rudimentary and a bit annoying? :)

                                    R Offline
                                    R Offline
                                    Ri_Ho
                                    wrote on last edited by
                                    #30

                                    Yes, just one of the many "features" that relegates python to a 'fast food' language. What's not a 'fast food' language - Tcl\Tk Net: Take a look at Tcl and then you will asking yourself "Why does python even exist?"

                                    1 Reply Last reply
                                    0
                                    • N Nand32

                                      Okay, that was an analogy. I was trying a little piece of Python code. Got a bit surprised with the "positional"-indentation requirements in code. Just like how it used to be in older programming languages like Cobol. (I'm not sure if any other recent programming languages enforce these) For example,

                                      If x is a:
                                      do //indented & works

                                      is different from

                                      if x is a:
                                      do //Non-indented & throws error

                                      It's funny, and doesn't this sound rudimentary and a bit annoying? :)

                                      R Offline
                                      R Offline
                                      rk2153
                                      wrote on last edited by
                                      #31

                                      This single feature has held me back from investing time into this language. Doing some RCA my opinion is that technology like language generators has promoted the creation of marginally different quite a few languages—so called jvm languages — There was php and Perl. Anyone not intellectually lazy and a bit more egoless would have perfected php instead of whipping up a new language with brain dead features. Not sure python space or dos backslash takes the top spot for an epoch of productivity killer. Backslash inventor now admits that is his worst decision.

                                      1 Reply Last reply
                                      0
                                      • N Nand32

                                        Okay, that was an analogy. I was trying a little piece of Python code. Got a bit surprised with the "positional"-indentation requirements in code. Just like how it used to be in older programming languages like Cobol. (I'm not sure if any other recent programming languages enforce these) For example,

                                        If x is a:
                                        do //indented & works

                                        is different from

                                        if x is a:
                                        do //Non-indented & throws error

                                        It's funny, and doesn't this sound rudimentary and a bit annoying? :)

                                        M Offline
                                        M Offline
                                        Member 12247860
                                        wrote on last edited by
                                        #32

                                        More python indention confusion ???

                                        # Python program to check if the input number is prime or not

                                        num = 15

                                        take input from the user

                                        num = int(input("Enter a number: "))

                                        prime numbers are greater than 1

                                        if num > 1:
                                        for i in range(2,num):
                                        if (num % i) == 0:
                                        print(num,"is not a prime number")
                                        print(i,"times",num//i,"is",num)
                                        break
                                        else:
                                        #print(num % i)
                                        print(num,"is a prime number")

                                        if input number is less than

                                        or equal to 1, it is not prime

                                        else:
                                        print(num,"is not a prime number")

                                        What the heck is that else: statement doing out there, who does it belong to? :)

                                        1 Reply Last reply
                                        0
                                        • A Asday

                                          Man, us "Pythonistas" are getting tired of this criticism. Do you indent your C? Of course you do, it's impossible to read poorly indented code. Does your C compiler whinge at you when you forget curly brackets? Of course it does, they define blocks. Except, you're already defining blocks for human eyes with indentation. Why do you also need to define them for machine eyes with curly brackets? Source code is for humans, not machines.

                                          K Offline
                                          K Offline
                                          kalberts
                                          wrote on last edited by
                                          #33

                                          So maybe we should shut up and accept that Python Is, After All, Doing The Right Thing? No. If your attitude is that "Noone should keep on critizising my language of choice!", then maybe you should search for another language. There is a distinct difference between visualizing the semantics through indentation (and to some degree braces), and to assign semantics to the intentation in itself. If you think assigning semantics to use of whitespace, you should take a look at the Whitespace language. There you can get everything you want in that direction! Whitespace semantics is crazy, judged from a readability and reliability point of view. Nothing related to indentation has any semantics in the C class of languages, so pretending that they are similar is a complete misunderstanding. A week or two ago, someone posted an April 1st proposal from Bjarne Strostrup (I am assuming that it really was written by him), a proposal about extending the operatior definitinions of C++, to allow operators to be defined for whitespace. He goes on to propose operator definitions for lack of whitespace. Sometimes, I suspect that Python addicts never noticed the publication date. (I did save Strostrup's proposal, but not the link. I might be able to dit it up from my browsing history, if anyone insists.)

                                          A 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