Liste des Groupes | Revenir à cl c |
On 07/12/2024 15:57, David Brown wrote:Sure. I just thought you'd like to know that when you make comparisons like this, you do so more subjectively than you might have imagined.On 06/12/2024 19:41, Bart wrote:I want to make my comment both fit on one line, and line up with the other, so I had to leave out '(on my keyword)'. I'd hoped that was implied.My language:>
>
println =a,=b # 13 characters, 0 shifted
>
Since some of us live in a world with more than one person - indeed, more than one country - you might like to know that "=" is shifted on many keyboards.
Spaces /are/ a big deal.>Spaces were left out to do a fairer comparison. Spaces aren't a big deal, they are fairly easy to type, I even left one in in my example because it looked too odd otherwise, and I was still ahead anyway.(And that space is optional!)>
The biggest irritation I have with your style, whether in your language or in C, is the lack of space. It's a big key - it's easy to press.
That's fair. But the result is better spacing, even if it is a by-product.Good spacing habits (in the broadest sense) is the single biggest factor to readability of code, text, hand-writing, and pretty much anything else.That is misleading. Forth REQUIRES those spaces otherwise it wouldn't work; each line would be read as one giant token. It's not because it wants to instill good habits.
>
The language Forth is not known for being easy to read amongst non- experts, but one thing it gets right is insisting that there are spaces between tokens.
If you wrote C in the same style, it would look pretty weird:Forth doesn't need the parentheses or the semicolons, making it a bit of an unfair comparison.
f ( ) ;That is just differently bad from "f(x,y,z);" and "q=(void*)p;". Too much space is bad spacing, just as too little space is bad spacing (and so is inconsistent spacing).
f ( x , y , z ) ;
++ p . x ;
q = ( void ) p ;
label :
f ( x , y , z ) ;
a [ i + 1 ] ;
I know this won't cut any ice, as nothing I can possibly write will ever make the slightest bit of difference, but in C you write stuff like this:No, in C /I/ don't write anything of the sort - nor do most C programmers. And I don't believe you write functions with 8 parameters in your language either. At the very least, these would be highly unusual.
Les messages affichés proviennent d'usenet.