Notes IV

Jarrod qwerty at ytre.wq
Sat Jan 26 05:21:42 PST 2008


On Fri, 25 Jan 2008 06:03:19 -0500, bearophile wrote:

> It improves code readability, probably reducing total bug count. Two
> common (and well enough designed) languages do it (Python and C#) so you
> have to take the idea seriously before refusing it.

I did. But all you did was replace a semicolon with the word 'in'. You 
still need a semicolon or comma there half the time. Why not just allow 
commas or semicolons? Better than reusing 'in'.


> Static variables are already available in functions, so that's just a
> dotted way to access those variables. That idea may be a way to keep
> memory usage low and to implment singletons (pattern) in a simple way
> :-)

Well, I guess. I'm still teeter-tottering on that one because it sort of 
changes the 'meaning' of a function to me.
But hey I won't really mind if it's added or not. 

> ...
>>and makes for a slower implementation.<
> 
> I don't belive/understand this.

Because I have to worry about how indented my code is before I can move 
on. Sometimes I want it on one line to look more compact, or because I'm 
just punching out code as fast as I can think it up and I don't want to 
worry about it's indentation.
When I'm done and it works, if I can't read it and need to look at it, 
Perltidy/Autoindent to the rescue.


>>No one wants to spend time worrying about how their code looks when
>>sometimes they just want to get it done and move on.<
> 
> Then few people will want to read/mantain/modify the code you write,
> even if all you write are rarely used 20-lines long Perl scripts. My
> code is elegant, well written, and I'm proud of it ;-)

The majority of my code is pretty readable too, but I don't want to be /
forced/ to make it look good. Just like how I don't want to be forced to 
use braces (Perl does, and I really, really don't like it. Fortunately 
Perl allows reverse conditionals without braces so it rarely happens)



More information about the Digitalmars-d mailing list