Something Go and Scala syntax

spir denis.spir at gmail.com
Thu Dec 30 06:36:15 PST 2010


On Thu, 30 Dec 2010 13:19:52 +0000 (UTC)
Adam Ruppe <destructionator at gmail.com> wrote:


> === back to the main point ===
> 
> Of course, I'm sure there's dozens of editors with a similar feature.
> There might also be an existing option or plugin in your current
> editor of choice. It's worth investigating.

Actually, do you know any editor _without_ this feature?

> btw you might say "an editor is no excuse for bad language design"
> but this isn't bad language design, it's just a preference on your
> part. So it should be fixed on your end.

But the actual issue is not about time at all, instead plain human laziness ;-)
Numerous studies have shown production programmers write about one dozen (yes, you read well) actually useful lines of code per day. Let us triple that for edition and refactoring. How much time does one need to type 3 dozen lines of code?
My guess is programmers spend ~ half of their time thinking, a quarter of their time controlling & another quarter fixing; the rest, typing.

> And if those 6 extra characters when reading (which are significantly
> easier to spot than the difference between a 'r' and a 'l' in the
> middle of an otherwise identical line!) cause length problems, your
> line is likely too long to begin with. Try using whitespace to
> break it up into groups or refactoring the initialization into a
> function.

Agreed.

> > if the "then" clause of the "if" uses {} then the () around the
> > test can be omitted:
> 
> That looks awful. It seems Go programmers don't care about tidy code.
> Languages should avoid such special cases.

Ditto.


Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d mailing list