monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] line endings as project policy


From: Richard Levitte - VMS Whacker
Subject: Re: [Monotone-devel] line endings as project policy
Date: Sat, 25 Nov 2006 08:44:59 +0100 (CET)

In message <address@hidden> on Thu, 23 Nov 2006 12:11:06 -0800, Daniel Lakeland 
<address@hidden> said:

dlakelan> On Wed, Nov 22, 2006 at 10:40:58AM +0100, Richard Levitte - VMS 
Whacker wrote:
dlakelan> 
dlakelan> >  - We need to convert line endings to the local standard on anything
dlakelan> >    that's assumed to be text on checkout.  This I regard as a fact.
dlakelan> >    (see the problem that some Unixly programs have with embedded \r)
dlakelan> 
dlakelan> Consider languages like Python that have the ability to
dlakelan> create multiline strings, now the \r or \n characters are
dlakelan> part of the string. Converting them changes the behavior and
dlakelan> meaning of the program. This is very tricky.

Does it really?  So, if I write that little example in a python
program in Windows, using notepad, I should expect my program to
expect differently on Windows than if I wrote that in emacs on a Unix
box and ran it on Unix?  If that is to be *expected*, then I'm
immediately throwing away python for any future plans.

Now, if I have some code elsewhere in the program that expects a
certain type of line ending, then I'm a programmer that only know that
particular platform, and I need to learn something about line ending
formats and true portability.

Consider doing the natural thing and using FTP to transfer the code,
in ASCII mode (well, it's source, so it's text, right?).  Then I can
watch my program go *bamf* until I fix it.

dlakelan> Example:
dlakelan> 
dlakelan> mystring = """This string
dlakelan> Has several
dlakelan> New line characters
dlakelan> embedded in it
dlakelan> suppose the contents were executable code
dlakelan> embedded in this string
dlakelan> can we safely convert the newlines?
dlakelan> No
dlakelan> """

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         address@hidden
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]