I agree with you. I love REPL. That is how a dynamic language should be used. Otherwise I might as well use a compiled one and get the benefits of static analysis. I don't have the luxury of quick restart as preprocessing data takes too much time for me, so I redefine classes and functions all the time in the same session. I run top level interactively to explore (post process) data. I was arguing against myself to point out some potential pitfalls. I don't claim they are a big problem, just something to be aware of.
On Friday, October 5, 2012 5:35:47 AM UTC-7, Edward K. Ream wrote: > > On Tue, Oct 2, 2012 at 5:06 PM, F.S. <[email protected] <javascript:>> > wrote: > > > What I was referring to was that when we eval everything at the top > level of course we break all the module restrictions. > > I have no idea what you are worried about. > Let's say we are working on a class/function that we are changing frequently and we don't want to restart every time. If we put our function in a module, in order to redefine it we can reload the whole module. But we want to be careful so that reloading the module doesn't create unwanted side effect. If that is impossible we need to just redefine the function without reloading the whole module. We probably need to do something like this: first define the function in top level, then rebind the module.function_name to the new definition at the top level. This is only possible if we have been very careful about scoping rules so that non-local symbols (global vars, imported names) referred to in the function body are always resolved consistently. The module system could interfere with REPL flow. I prefer the Lisp way of long meaningful symbol names instead of relying on the module system to keep namespaces separate. -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To view this discussion on the web visit https://groups.google.com/d/msg/leo-editor/-/HazneVg2m_AJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
