[futurebasic] RE: [FB] Re: Line-wrapping in the Editor

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2010 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <Waverly.Edwards@...>
Date: Wed, 20 Jan 2010 09:00:06 -0600
There is more to adding the [+] sign as a means of line continuation than meets the eye.  In other languages that I've studied, there has been a problem where the user runs into ambiguity in the language due to the overloading of a special character.  Overloading of the [+] sign would have an effect on the language.  The current uses (that I can think of) for the [+] sign or addition (math), concatenation of strings, variable incrementing and the positive sign.

x = 7 + 7
thisString = thatString + theOtherString
z = +144 

Though the use of a positive sign is probably not common, the language specifications allow for this.

Is it wise to continue to overload the meaning of the [+] sign?  Overloading the [+] sign changes the context of the language.   I don't have a specific example in FB there would be contention but its been my experience that whenever possible, a line continuation character should be a character that does not already exist in the language and that in future expansion of that language, it would continue to be innocuous.


-----Original Message-----
From: Ken Shmidheiser [mailto:kshmidheiser@...] 
Sent: Tuesday, January 19, 2010 7:05 PM
To: futurebasic@...
Subject: [FB] Re: Line-wrapping in the Editor

Laurent wrote:

>I am not enthousiastic any more about soft carriage returns
>in FB code; long lines should be broken by the programmer
>where the break improves readability, and not at the whim
>of a text editor, which usually means where the current
>(but changeable) window width dictates.

The C convention of ignoring returns and white 
space and determining line endings by semicolons 
would be one possible solution that complies with 
a major coding convention. (White space is good-- 
it allows beautiful code.)

Then again, one reason I like FB is because you 
don't need pesky semicolons. It's always a pain 
switching between FB, C, C++ and Objective-C and 
enduring compiler complaints over missing 
semicolons.   :-)

Also "[+]" requires four keystrokes (including 
the return) in addition to one shift (unless you 
use the keypad for the "+". That compares with 
the simplicity of Option-l's "¬".


To unsubscribe, send ANY message to: futurebasic-unsubscribe@...