Ovid publiustemp-perl6language2-at-yahoo.com |Perl 6| wrote:
This might not be too big a deal, but the formatting of the code is a
bit odd. It's not monospaced and the indentation and brace placement
seem very arbitrary. Since these items are always "code smells" to me
of a bad programmer[1], seeing it in an otherwise good paper is very
jarring. Could this merely be a strange rendering artifact?
Cheers,
Ovid
[1] Well, the monospaced bit isn't since I'm not used to programmers
programming in word processors instead of text editors. Perhaps I'm
spoiled :)
The code is not monospaced, since this isn't the 1980's. I've been
writing code using an editor that uses proportional fonts for years. I
find it more readable, and helps fit things on a line without scrolling too.
Source Insight even changes font size and color for highlighting.
Function names are big and blue, for example.
If the braces and positioning is funny, I wonder if it's a rendering
thing. I'm using Windows and have the fonts. Could you post a screen
shot and point out what's inconsistent?
sub foo ()
{ # one char indent for body
...
}
class {
has $.x; # blocks indented 3 spaces
}
Closing brace is always aligned with the content it is closing. Opening
may be same, or on previous line.
--John