[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Default Styles in KF5
From:       "Philipp A." <flying-sheep () web ! de>
Date:       2014-02-21 20:57:13
Message-ID: CAN8d9g=atEy5q8J5dZ6C-SFGEMYSiWJpj8-AiY6Gxj+oODHYiQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


2014-02-21 0:49 GMT+01:00 Sven Brauch <svenbrauch@googlemail.com>:

With the current setup, I don't see a need for dsBuiltin personally. For the
> bash example, couldn't you use dsFunction for all the commands? That seems
> pretty logical to me. Also in python I think everything is covered with
> dsConstant, dsFunction and dsKeyword. dsBuiltin would be a subset of things
> that fit into dsConstant and dsFunction.
>
As Matthew said:

   -

   dsFunction is def foo(arguments): (foo) as well as bar.baz() (baz)
    -

   dsLanguageConstant is True, False,None,Ellipsis`
    -

   dsConstant is derived from convention: EVERYTHING_CAPS_WITH_UNDERSCORES
    -

   dsBuiltin is functions like open, enumerate, range and types like set,
   dict, and special methods like __bool__, __lt__

The last one is arguably the most useful, as you'll see immediately if you
e.g. wrote def __str_(self): instead of using two underscores at the end.
And distinguishing between dsLanguageConstant and dsConstant might not be
necessary. normal constants would be that style and all-caps, while
language constants are that style and *not* all caps.

All those are python examples, but i can guarantee you that there are
analoguous things in all scripting languages, as well as other languages
like Go.

Either way, as said, pretty nice -- I think we can get quite far with this
> :)
>
i also like it very much. great job people!

PS: I'm also for dsSpecialChar, but i guess its omission is just an
oversight.

[Attachment #5 (text/html)]

<div dir="ltr"><div style class="markdown-here-wrapper" \
id="markdown-here-wrapper-111123"><p style="margin:1.2em 0px!important">2014-02-21 \
0:49 GMT+01:00 Sven Brauch &lt;<a href="mailto:svenbrauch@googlemail.com" \
target="_blank">svenbrauch@googlemail.com</a>&gt;:</p>


<p style="margin:1.2em 0px!important"></p><div \
class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin:0 \
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> With the current setup, I \
don&#39;t see a need for dsBuiltin personally. For the<br> bash example, couldn&#39;t \
you use dsFunction for all the commands? That seems<br> pretty logical to me. Also in \
python I think everything is covered with<br> dsConstant, dsFunction and dsKeyword. \
dsBuiltin would be a subset of things<br> that fit into dsConstant and \
dsFunction.<br></blockquote><p></p></div><p style="margin:1.2em 0px!important"></p> \
<p style="margin:1.2em 0px!important">As Matthew said:</p> <ul style="margin:1.2em \
0px;padding-left:2em"> <li style="margin:0.5em 0px"><p style="margin:1.2em \
0px!important;margin:0.5em 0px!important">dsFunction is <code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">def \
foo(arguments):</code> (foo) as well as <code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">bar.baz()</code> \
(baz)</p>


</li>
<li style="margin:0.5em 0px"><p style="margin:1.2em 0px!important;margin:0.5em \
0px!important">dsLanguageConstant is <code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">True</code>, \
<code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">False,</code>None<code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">,</code>Ellipsis`</p>



</li>
<li style="margin:0.5em 0px"><p style="margin:1.2em 0px!important;margin:0.5em \
0px!important">dsConstant is derived from convention: <code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">EVERYTHING_CAPS_WITH_UNDERSCORES</code></p>



</li>
<li style="margin:0.5em 0px"><p style="margin:1.2em 0px!important;margin:0.5em \
0px!important">dsBuiltin is functions like <code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">open</code>, \
<code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">enumerate</code>, \
<code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">range</code> \
and types like <code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">set</code>, \
<code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">dict</code>, \
and special methods like <code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">__bool__</code>, \
<code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">__lt__</code></p>



</li>
</ul>
<p style="margin:1.2em 0px!important">The last one is arguably the most useful, as \
you'll see immediately if you e.g. wrote <code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">def \
__str_(self):</code> instead of using two underscores at the end. And distinguishing \
between dsLanguageConstant and dsConstant might not be necessary. normal constants \
would be that style and all-caps, while language constants are that style and \
<em>not</em> all caps.</p>


<p style="margin:1.2em 0px!important">All those are python examples, but i can \
guarantee you that there are analoguous things in all scripting languages, as well as \
other languages like Go.</p> <p style="margin:1.2em 0px!important"></p><div \
class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin:0 \
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Either way, as said, pretty nice -- I think we can get quite far with this \
:)<br></blockquote><p></p></div><p style="margin:1.2em 0px!important"></p> <p \
style="margin:1.2em 0px!important">i also like it very much. great job people!</p> <p \
style="margin:1.2em 0px!important">PS: I'm also for dsSpecialChar, but i guess its \
omission is just an oversight.</p> </div></div>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic