Talk:Eiffel (programming language): Difference between revisions

Content deleted Content added
Line 6:
== Archives ==
[[/Archive 1]]
 
==What's wrong with language font conventions?==
I see two articles on programming languages with examples using specific fonts in accordance with the respective language conventions (keywords in boldface): [[Simula]] and [[Algol 60]]. It's not clear why this can't apply to Eiffel as well. [[User:Fuchsias|Fuchsias]] 03:18, 9 September 2006 (UTC)
 
:These two examples make use of '''bold''' and ''italics'', but neither use any special color. Just a data point. If you'd like to participate in the Quick Poll about this, I'm sure that would be helpful, Fuchsias. [[User:Lulu of the Lotus-Eaters|<span style="color:darkgreen;">LotLE</span>]]×[[User talk:Lulu of the Lotus-Eaters|<span style="color:darkred;font-size:x-small;">talk</span>]] 03:21, 9 September 2006 (UTC)
 
::I understand color is more controversial, but didn't you remove all boldface and italics as well?[[User:Fuchsias|Fuchsias]] 03:35, 9 September 2006 (UTC)
::One more: [[Pascal (programming language)]] uses bold keywords. What's all the fuss about?[[User:Fuchsias|Fuchsias]] 03:49, 9 September 2006 (UTC)
 
:::I didn't ''remove'' any typography at all, at least not in the way Meyer claims. I copied some sections over from the "scratch pad" draft that a few editors used while the article was protected, in order to get my wording improvements back in place (as Meyer ''requested'' I do on the talk page!). Nonetheless, what we have now is clearly the "Wikipedia default", so absent some consensus to do otherwise, it's the ''right thing''. FWIW, I thought about how I might automatically add highlighting to code samples should such consensus emerge. I found a keyword list, and the whole thing would take less that 20 lines of code to do automatically. So bellyaching about the huge effort that might be involved in adding highlights is rubbish... I'll write a script in 15 minutes, and run it in 5 seconds. [[User:Lulu of the Lotus-Eaters|<span style="color:darkgreen;">LotLE</span>]]×[[User talk:Lulu of the Lotus-Eaters|<span style="color:darkred;font-size:x-small;">talk</span>]] 04:15, 9 September 2006 (UTC)
 
Just found another example: [[Algol W]] uses underlining. More evidence that elsewhere having each language article follow the language's own conventions doesn't seem to have bothered anyone. [[User:Fuchsias|Fuchsias]] 03:34, 9 September 2006 (UTC)
 
:Note that no-one has contended the use of Eiffel-specific code formatting in the code sample blocks. It is formatting of inline code (code in the article text) that is controversial and inadvisable for many reasons. So the articles you've listed are, unfortunatly beside the point; notice that none of them uses language-idiosyncratic formatting of inlined code. [[User:Mikademus|Mikademus]] 09:16, 9 September 2006 (UTC)
 
::Please note the quick poll above: A number of editors have stated a preference against using Eiffel conventions in code blocks, in some cases only against the color convention. But certainly, a larger number of editors dislike inlined code highlighting. [[User:Lulu of the Lotus-Eaters|<span style="color:darkgreen;">LotLE</span>]]×[[User talk:Lulu of the Lotus-Eaters|<span style="color:darkred;font-size:x-small;">talk</span>]] 14:49, 9 September 2006 (UTC)
 
:::I meant that during the flurry of Meyer's edits, before the real atagonism arose, no-one was intransigent about colours in the code boxblocks. [[User:Mikademus|Mikademus]] 17:35, 9 September 2006 (UTC)
 
::::Which, I think, leaves the best compromise position as being that of using font conventions everywhere without use of colour anywhere. This removes the primary complaint with regard to font conventions for inline code - that it becomes confused with Wikilinks, and removes the primary complaint with regard to removal of font conventions - that keywords, variables, etc. referenced inline in the text are clearly referencing code, are more readable, and consistent in style with their reference point in code blocks.
::::It strikes me that this is an easy solution. Clearly if we can have readability and consistency without creating confusion then we should do that. [[User:Leland McInnes|Leland McInnes]] 21:05, 9 September 2006 (UTC)
 
FTR, the [[WP:MOS|Wikipedia manual of style]] is very clear on [[WP:MOS#Color_coding|the use of color]] -- namely, don't do it. - [[User:KeithTyler|Keith D. Tyler]] [[User_talk:KeithTyler|&para;]] <small>([[WP:AMA|AMA]])</small> 18:34, 19 September 2006 (UTC)
 
:I read [[WP:MOS#Color_coding|the use of color]] as very clearly stating: "Using color <font bold>ALONE</font> to convey information (color coding) should not be done. ... <font bold>It is certainly desirable to use color as an aid for those who can see it</font>, but the information should still be accessible without it." [[User:75.5.175.149|75.5.175.149]] 02:34, 20 September 2006 (UTC)
 
 
 
=== Adding boldface to keywords ===
Here's the 15 lines necessary to highlight all the keywords in the Wikitext:
 
<pre><nowiki>
#!/usr/bin/python
import sys
kws = '''
alias all and as check class create debug deferred do else
elseif end ensure expanded export external feature from frozen
if implies indexing infix inherit inspect invariant is like
local loop not obsolete old once or prefix redefine rename
require rescue retry select separate then undefine until
variant when xor'''.split()
fname = sys.argv[1]
wikitext = open(fname).readlines()
for line in wikitext:
if line.startswith(' '):
for kw in kws:
line = line.replace(" %s" % kw," '''%s'''" % kw)
print line,
</nowiki></pre>
 
If I have the keywords wrong, let me know to fix it. I'm not really sure what the rule is for where italics go (the article doesn't really say clearly), but presumably if I did it would be easy to add to the simple scaffolding. [[User:Lulu of the Lotus-Eaters|<span style="color:darkgreen;">LotLE</span>]]×[[User talk:Lulu of the Lotus-Eaters|<span style="color:darkred; font-size:x-small;">talk</span>]] 04:44, 9 September 2006 (UTC)
 
:Please note that such a script will also only cover codeblocks, and not inline code. There is also, as you note, the issue of italics. [[User:Leland McInnes|Leland McInnes]] 05:53, 9 September 2006 (UTC)
 
=== authors intention not important? ===
if the author thinks the typesetting is important, why not leave it as such? if you really write code in eiffel, you anyway use an editor and set your style to your own preferences. imo wikipedia tries to give an authentic picture and is not "your personal text editor". one paragraph at the end hinting at that is just blowing up an already long article.
 
also python uses a special kind of indention ... but contrary to eiffel the python compiler enforces it. currently the article sometimes does not get the indention right - comp. http://se.ethz.ch/~meyer/publications/online/eiffel/basic.html.
 
is there a place to vote about such things in en.wikipedia.org?
 
--[[User:ThurnerRupert|ThurnerRupert]] 05:22, 19 September 2006 (UTC)
 
== Bold and italic font conventions ==