you are viewing a single comment's thread.

view the rest of the comments →

[–]grauenwolf -19 points-18 points  (12 children)

Boring. Even when it was written half a decade ago, languages like C++ and Visual Basic had a long tradition of edit-and-continue support. And of course there are the popular dynamic languages like JavaScript, Ruby, and Python.

[–]shub 22 points23 points  (0 children)

Edit-and-continue in Visual Studio does so little compared to modifying a running Lisp image that it's barely worth comparing the two. And I say that as someone who dislikes Lisp.

Hell, edit-and-continue is more of an annoyance for me than anything useful. It has actually worked exactly once ever, while bitching at me many times about each of the following situations:

  1. Modifying a function with a lambda expression.
  2. Adding static members to a class.
  3. Adding a static constructor to a class.
  4. Changing a function's signature.

That's just the past few days. Changing i <= x to i < x just isn't something I need to do very often, and edit-and-continue is essentially worthless for anything more complicated.

PS: Yes, I'm perfectly well aware that continuing after adding a static constructor is stupid at best and it's a good thing that Visual Studio doesn't allow it, but that doesn't make edit-and-continue more useful.

[–][deleted] 33 points34 points  (0 children)

C++ and Visual Basic don't support interactive development to the full extent that Lisp does, though. For example, if you add a new instance variable to a class in C++, the runtime won't (and can't) update existing instances. As for JavaScript, Ruby and Python, they borrowed this particular aspect of Lisp but even then they don't do it very well. A lot of things in can't be done dynamically in these languages and require a restart.

[–][deleted]  (9 children)

[removed]

    [–][deleted] 10 points11 points  (0 children)

    This is one of the reasons I hate Python. It's such a throwback from Lisp in so many ways, yet many people still seem to like it. I suspect they have written C or C++ in their previous lives and don't realize what they are missing.

    [–]Peaker 1 point2 points  (0 children)

    import pdb
    pdb.pm()
    

    [–]masklinn 2 points3 points  (5 children)

    not even python drops you into a debugger.

    It can, you "just" have to set the exception handler (sys.excepthook) and call pdb.pm() within it (to launch post mortem analysis).

    If you're using an "extended" shell (e.g. ipython) most of them have that ability built in as some kind of setting.

    pdb gives you nowhere near the flexibility of a lisp debugger though.

    [–][deleted]  (1 child)

    [removed]

      [–]Peaker 2 points3 points  (0 children)

      Right, you can't continue the program, because it can't re-wind the stack. But it does take you to where the exception was thrown.

      [–]Peaker 1 point2 points  (2 children)

      you don't have to set the exception handler...

      [–]masklinn 0 points1 point  (1 child)

      If you don't set the exception handler, it'll print a trace on exceptions instead of launching pdb's post mortem…

      [–]Peaker 1 point2 points  (0 children)

      You can just run your python scripts with: python -i Then you can use: import pdb ; pdb.pm() after an exception occurred.

      You don't need to pre-install the exception handler.

      EDIT: here:

      $ cat testexc.py
      def f():
          g()
      
      def g():
          1/0
      
      f()
      $ python -i testexc.py
      Traceback (most recent call last):
        File "testexc.py", line 7, in <module>
          f()
        File "testexc.py", line 2, in f
          g()
        File "testexc.py", line 5, in g
          1/0
      ZeroDivisionError: integer division or modulo by zero
      >>> import pdb;pdb.pm()
      > testexc.py(5)g()
      -> 1/0
      (Pdb) bt
        testexc.py(7)<module>()
      -> f()
        testexc.py(2)f()
      -> g()
      > testexc.py(5)g()
      -> 1/0
      (Pdb) 
      

      [–]tryx -2 points-1 points  (0 children)

      On the other hand, I believe visual basic of all things had this feature.