From kwrite-devel Fri Feb 21 20:57:13 2014 From: "Philipp A." Date: Fri, 21 Feb 2014 20:57:13 +0000 To: kwrite-devel Subject: Re: Default Styles in KF5 Message-Id: X-MARC-Message: https://marc.info/?l=kwrite-devel&m=139301626425159 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1412588672564055269==" --===============1412588672564055269== Content-Type: multipart/alternative; boundary=f46d04479f93f9cb3104f2f0de2f --f46d04479f93f9cb3104f2f0de2f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2014-02-21 0:49 GMT+01:00 Sven Brauch : With the current setup, I don't see a need for dsBuiltin personally. For th= e > bash example, couldn't you use dsFunction for all the commands? That seem= s > pretty logical to me. Also in python I think everything is covered with > dsConstant, dsFunction and dsKeyword. dsBuiltin would be a subset of thin= gs > 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=E2=80=99ll 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=E2=80=99m also for dsSpecialChar, but i guess its omission is just an oversight. --f46d04479f93f9cb3104f2f0de2f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

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

With the current setup, I don't see a need for dsBuiltin personally. Fo= r the
bash example, couldn't you use dsFunction for all the commands? That se= ems
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 s= pecial methods like __bool__, __lt= __

The last one is arguably the most u= seful, as you=E2=80=99ll 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 neces= sary. normal constants would be that style and all-caps, while language con= stants 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 langu= ages, 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=E2=80=99m also for dsSpecialC= har, but i guess its omission is just an oversight.

--f46d04479f93f9cb3104f2f0de2f-- --===============1412588672564055269== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KWrite-Devel mailing list KWrite-Devel@kde.org https://mail.kde.org/mailman/listinfo/kwrite-devel --===============1412588672564055269==--