Re: OT - trivial programming language
Steve Lamb <grey@dmiyu.org> writes:
> Kai Grossjohann wrote:
>> If the middle two lines were indented with a tab, then people could
>> view this code with different indentation settings by just frobbing
>> the tab width, without changing the file contents.
>
> Good in theory, bad in practice. For example, in my Perl code I prefer an
> indention of 2 spaces. Don't ask why, I just do.
:-X
> if (foo){
> if (bar){
> foreach $foo (@bar){
> while $foo < $baz{
> some really long and convoluted computation here
> }
> }
> }
> }
>
> Now expand that out to someone's preferred 8 per line (ewwwww) and you'll
> see that the "some really long and convoluted computation here" is wrapping.
> On my screen it looks reasonable, on someone else's it looks like crap.
Well, nothing that couldn't be solved with a somewhat wider window.
Many people like to have windows wider than 80 columns. (I prefer 80
columns, myself.)
>> The "b" line should start with one tab (for the indentation) and then
>> four spaces (for the alignment with the "a" above it).
>
>> I wish that Emacs would allow this style of editing.
>
> Thank god it doesn't. That is the worst possible style since tab is
> meaningless.
Hm?
> It is because of this mixing of tabs and spaces that people
> rigidly say that tabs should never be changed from 8 character widths.
The style I'm proposing is designed to make it possible to change tab
width!
> It is also because of indention and alignment that I think that
> people should never, ever, us tabs because there are going to be
> some schmucks that break the first rule of never changing the tab
> width in the first place.
Huh?
Kai
Reply to: