Title: FreeCode Signature
Heyas again!
    
  
If I understand this correctly, it unfortunately breaks the following code:
    
  foo bar
      fie

      ; some comment
      muae
      naja hehe

  
The code is supposed to mean (foo bar fie muae (naja hehe))...
    

Except for the blank line, this would work just fine.   I had a separate proposed rule saying that "whitespace-only lines = line with no whitespace", I'll presume that's what you're commenting on.
  
Yes, that's it.
Yes, that's a downside of that proposal.  On the other hand, your example might ALSO have the same interpretation - there's no way to tell the difference, because the difference is in the amount of whitespace on a line.
  
I think that paying to attention to indentation on whitespace-only lines is a long series of hairy bugs waiting to happen.  I don't think anyone wants to debug by checking WHITESPACE on blank lines.  I sure don't, I make enough mistakes already :-).
  
That's why I'd rather have the system ignore empty lines/lines with only space all together.
I think there's an easy workaround that makes this useable; if you want vertical space, just use a ";" character and nothing else.  Like this:
  foo bar
      fie
      ;
      ; some comment
      muae
      naja hehe
  
But this adds a rather big disadvantage - that you have to care about the indentation of comments! You can not any longer write
  foo bar
      fie
          bar naja
;; FIXME
              hehe
                  muae
; some comment that's to long to fit in the small space to the right
                      mumu
;;;;;;;;;;;;;;;;;; SOME SPACER ;;;;;;;;;;;;;;;;;;;
                      naja hehe
Which sometimes makes an awful lot of sense, esp. the FIXME-part...

Another option I didn't mention was to "ignore whitespace-only lines".  That would work well in files, but it would HIDEOUS for interactive use.  It'd mean that you would have to enter your NEXT command before reading (and execution) of the previous command, making it CERTAIN that your output will be out-of-sync.  And I think it'd be a VERY bad idea for the syntax to vary between interactive and non-interactive use... it's confusing, and makes debugging rough.
  
It varies in exactly that way in Python. And I haven't had too much problems with that, except that it makes copy-pasting code into the interpreter hard.

Another solution would be to add another key-combindation interactively to mean "execute this, I'm done", but that would have the disadvantage of confusing people :(

/Egil

--
Konsulent, Fri Programvare / Free Software Consultant
Cell: +47 - 91 17 05 93
Phone: +47 - 21 53 69 00, Fax: +47 - 21 53 69 09
Addr: Slemdalsveien 70, PB 1 Vinderen, 0319 Oslo

 Free beer costs nothing, freedom costs a fight.
 Free beer lasts an eavening, freedom lasts a lifetime.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to