Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which Is More Readable To You?
Message
From
06/03/2008 13:23:45
 
 
To
06/03/2008 02:38:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01298471
Message ID:
01299386
Views:
14
>>>I find the latter easier to read, but from experience I know it's harder to maintain, for the reasons Craig and Dorris have already outlined. I "view" it as being pretty, but fragile.
>>>
>>>I believe questions like this should be moot - the IDE should be configurable to show you the code the way you want to see it. It should have 2 modes: "real" mode, which shows you exactly what's in the source file, and "pretty" mode, which would make it more readable according to your personal preferences. Ideally modes could be switched quickly with a hot key etc.
>>>
>>>The idea would be similar to applying different CSSs to a Web page.
>>>
>>>Now that the VFP language is "stable" something like this could conceivably be built :)
>>>
>>>For comparison, my impression is the VS IDE is fairly rigid in its conventions for indentation and whitespace, from the very limited amount I've used it and seen it demo'd. Maybe I just never bothered to look for any customizations. Overall its code editor's better than VFP's, however.
>>
>>I think your impression is wrong. You should take a look at the options in the Text Editor settings (including the language specific ones) - it's hard to think of any options that *aren't* available <g>
>>
>>>I attended the HHH launch event today here in Vancouver and the code editing demos (in VS 2008) still looked pretty rigid in formatting. It would seem that MS's preference is for less flexibility and personalization, rather than more.
>
>I don't have VS2005 or 2008 installed, but I did a search on MSDN and came up with http://msdn2.microsoft.com/en-us/library/03864tbz.aspx
>
>It looks like the "biggie" wrt formatting is enabling or disabling automatic formatting of completed statements or blocks. I suppose if you turn this off you can do whatever you want. My guess is that it's turned on by default, and if so you get what MS thinks is best.
>
>I was thinking more along the lines of the sort of readability "discussions" threads we've seen here over the past while. Personally I'd like to be able to specify things like:
>
>- Clause alignment as the OP illustrated in this thread
>- White space in parentheses e.g. ( parameter ) vs. (parameter)
>- White space around operators e.g. x = y + z vs. x=y+z
>- Multiple parameters on multiple lines, with leading or trailing commas e.g.
>
>SELECT ;
>  Col1 ;
>  , Col2 ;
>  ...
>
>vs.
>
>SELECT ;
>  Col1, ;
>  Col2, ;
>  ...
>
>- Whitespace prior to continuation character e.g.
>Statement ;
>vs.
>Statement;
>
>- The list goes on and on ...
>
>We all have our own preferences for these little things. Correct me if I'm wrong, but I didn't see anything like this in the VS text editor options, at least in the MSDN docs.

I think you're wrong. In C# I'm pretty sure there are white space options for all of the things you've mentioned (well over twenty seperate options on spacing alone - plus about the same number again dealing with indentation and new line options). Howver VB users are not so well catered for.
Regards,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform