E
Ed Leafe
Indeed, there is only one user interface that needs no
documentation whatsoever.
Yeah, and it sucks! ;-)
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
Indeed, there is only one user interface that needs no
documentation whatsoever.
example, which does not need documentation is the natural language, and
that contains so many ambiguities that humans often get instructions wrong.
Richard said:I doubt it: a lot of people have asserted something similar over
the years but I don't remember anyone ever bothering to post
a patch
(and if someone has it disappeared without a ripple).
JohnBMudd said:Python could take over the programming world except one of it's best
features (scope by indent) is a primary reason why it never will. It's
not flexible enough. A large percentage of programmers won't even try
the language.
And nobody else sees the need for change? Oh, except those who think
Tabs are evil and should no longer be allowed.
How about (1) add some more flexibility for optional braces […]
Lee Harr said:I have never seen anyone suggest mixing tabs and spaces, and I
have read a lot of tabs-vs-spaces flamewars in my time.
Everyone agrees that mixing is bad. I might even go so far as to
say that the only real problem is mixing. The question is, if we
are trying to pick only one, which one causes fewer problems.
Actually using tabs for eight spaces and then filling out with spaces to
the correct indentation is the convention for Emacs Lisp. Of course,
since everyone coding Emacs Lisp does it with the same editor, it's no
problem.
Peter Decker said:I'm starting to suspect that the same people who are zealous about
spaces are also the same people who look down on anyone who doesn't
agree with their choice of text editor.
Christopher Subich said:This quote, with a naive reading, would seem to imply that "needing
documentation is evidence of bad design." I think we can all agree that
this interpretation is ludicrous: the only programming language, for
example, which does not need documentation is the natural language, and
that contains so many ambiguities that humans often get instructions wrong.
Sound good but... we're programmers, not documentation specialist or
motivational speakers. Why, when I suggest fixing a design defect with
code, do so many programmers want to respond with... documentation and
arguments instead of code?
From "The Design of Everyday Things", docs are a sign of poor design.
Paul Rubin said:The variable `indent-tabs-mode' controls this. I like no tabs.
The day TABs are banned from the source, I drop python forever. It took meAGREE! AGREE! AGREE!
Björn Lindström said:Same here. It's still the convention for Emacs code, regrettably.
I don't use Emacs, I do indent with tabs, and I do fill in the extra
spaces of continuation lines with spaces. Therefore, I break all the
commandments and do everything wrong.
FWIW, I've long struggled with my opinion on tabs versus spaces. When I
started programming in 1995, tabs seemed the logical choice because I
was using different editors all the time and I could tell each editor
how many spaces to give each tab. But then as I started reading more
people's code I started seeing patterns in source code that I couldn't
emulate using pure tabs. This comes down to horizontal "lining up"
continuation lines with prior lines. Examples:
select customer.cfirst,
customer.clast
from customer
where customer.cstate in ("CA", "OR")
order by customer.clast
win = dabo.ui.dDialog(self, NameBase="frmRulesDialog",
Caption="Minesweeper Rules",
SaveRestorePosition=True,
Centered=True, Modal=False)
Everyone that was writing "beautiful code" like this was using spaces
only. So I switched. But it was a real PITA to not be able to use any
old editor, only ones that could set how many hard spaces to make for
each hard tab. And, I had to remember to make that setting because I
prefer 2 spaces per tab.
So now I'm back to tabs for indentation and spaces for lining up
continuation lines. Example:
win = dabo.ui.dDialog(self, NameBase="frmRulesDialog",
Caption="Minesweeper Rules",
SaveRestorePosition=True,
Centered=True, Modal=False)
(if that didn't come over email correctly, that is one tab for
indentation on all three lines, followed by several spaces on lines 2
and 3 for getting the arguments lined up with the previous line.)
I've been reluctant to admit to doing this since it violates the NEVER
MIX TABS AND SPACES commandment, but there you go. I found a way to
reconcile the best of both worlds, because let's face it, tabs do make
slightly more sense.
The day TABs are banned from the source, I drop python forever. It took me
too long to get used to indentation in the first place, now if you ban TABs
(which make code formatting a whole lot easier), I'm dropping python.
Zeljko Vrba said:The day TABs are banned from the source, I drop python forever. It took me
too long to get used to indentation in the first place, now if you ban TABs
(which make code formatting a whole lot easier), I'm dropping python.
doesn't make it a defect.
it's somewhat ironic that you have to cite a documented
source to back up your point.
Do you think that adding braces to Python will mean
we can remove part of the existing documentation?
is a programming language an "Everyday Thing"?
...things should be self-documenting and obvious.
You simply can't do that with programming languages.
Actually, it does.
Where it will cut down is the
otherwise unending debate over the issue. Documentation is not just
what you find on a single web page.
And it might help bring Python into the mainstream.
Maybe not completely. Trust me though, we can do better.
Op 2005-12-06 said:Actually, it does. Unless you're in the business of building security
systems. Then the goals are reversed.
I can accept that you like scope by indent and don't want to see any
changes gong forward. That's your choice.
Somewhat.
No, it will add a little there. Where it will cut down is the
otherwise unending debate over the issue. Documentation is not just
what you find on a single web page.
Op 2005-12-06 said:Whose definition of defect are we using? And how small a sample
population are we going to require in order to find a 'something' which
less than 'a few' people dislike?
It will cut down debate but it would make the language more complex and
less consistent. I don't think that's a price worth paying.
I'd much rather educate the mainstream to be able to see the benefits
of this method, than drag Python down to meet them.
Of course. However I would argue that indented scope is one way of
doing so. Scope is instantly visible, and no longer a game of 'hunt the
punctuation character, which is in a different place depending on the
coder's style'.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.