On 2015-03-14 23:15:34 +, Brian Schott said:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a formatter
for D source code.
So far I have the following:
* Insert spaces between if, while, for, foreach,
On 03/27/2015 04:30 PM, Shammah Chancellor wrote:
What am I missing?
A way to configure this and have it look for the most relevant
`.dfmtcfg` file! :)
That is to say, make it look up from the current directory recursively
until it finds a config file, and use that.This will greatly
On 2015-03-23 10:47, bearophile wrote:
See:
https://issues.dlang.org/show_bug.cgi?id=7176
Exactly.
--
/Jacob Carlborg
On 03/23/2015 10:55 AM, Casper =?UTF-8?B?RsOmcmdlbWFuZCI=?=
shortt...@hotmail.com wrote:
Perhaps it's too much to wish for, but I think the editor would be the
better place for this. IntelliJ IDEA can display short methods as single
line. They're still multiline in the source, but on screen
Jacob Carlborg:
Although I would like that the D syntax allowed to drop the
curly braces, like with if-satements. That would result
in much nicer one-liner functions.
See:
https://issues.dlang.org/show_bug.cgi?id=7176
Bye,
bearophile
On Sunday, 22 March 2015 at 17:05:27 UTC, Martin Nowak wrote:
I think there should be an option (even default on) to allow
small
single line functions. (snip)
Perhaps it's too much to wish for, but I think the editor would
be the better place for this. IntelliJ IDEA can display short
On 2015-03-22 18:05, Martin Nowak wrote:
Sorry haven't read the whole thread.
I think there should be an option (even default on) to allow small
single line functions.
This can sometimes be fairly annoying. For example when writing range
adapters, see
On 3/22/15 10:05 AM, Martin Nowak wrote:
On 03/15/2015 12:15 AM, Brian Schott wrote:
What am I missing?
Sorry haven't read the whole thread.
I think there should be an option (even default on) to allow small
single line functions.
This can sometimes be fairly annoying. For example when
On 03/15/2015 12:15 AM, Brian Schott wrote:
What am I missing?
Sorry haven't read the whole thread.
I think there should be an option (even default on) to allow small
single line functions.
This can sometimes be fairly annoying. For example when writing range
adapters, see
On 2015-03-15 00:15, Brian Schott wrote:
What am I missing?
* Ideally, any space that is optional in the language should be configurable
* Newlines between functions/structs/classes and so on
* Preserve grouping of variable declarations, i.e.
int a;
int b;
int foo;
int bar;
--
/Jacob
On 2015-03-15 06:54, Dicebot wrote:
On actual topic : having look at Eclipse C++ codestyle options may give
many useful hints.
And for Eclipse Java formatting options.
--
/Jacob Carlborg
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright wrote:
On 3/14/2015 4:15 PM, Brian Schott wrote:
What am I missing?
I suggest defining The One True Way and have no configuration
options.
+1
On 2015-03-16 01:13, Rikki Cattermole wrote:
Its just a real pain to create these stubs by hand. Atleast this way,
people will moan about documentation being empty and it'll seem less
work to do.
This should be done by the editor.
--
/Jacob Carlborg
On Tue, 17 Mar 2015 10:36:47 +0100, Jacob Carlborg wrote:
On 2015-03-16 01:13, Rikki Cattermole wrote:
Its just a real pain to create these stubs by hand. Atleast this way,
people will moan about documentation being empty and it'll seem less
work to do.
This should be done by the editor.
On Monday, 16 March 2015 at 02:16:18 UTC, Brad Anderson wrote:
On Saturday, 14 March 2015 at 23:15:35 UTC, Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a
formatter for D source code.
Am 15.03.2015 um 06:55 schrieb Dicebot:
On Sunday, 15 March 2015 at 01:45:56 UTC, Walter Bright wrote:
On 3/14/2015 4:59 PM, Brian Schott wrote:
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright wrote:
I suggest defining The One True Way and have no configuration
options.
I hope you
On Sun, 15 Mar 2015 13:47:26 +, ketmar wrote:
on the other side, i can see a sense in generating stubs for functions
and templates, as it's somewhat boring to copypaste argument names. not
that it's a big deal, but... ;-)
i mean ddoc stubs, of course. ;-)
signature.asc
Description: PGP
On Saturday, 14 March 2015 at 23:15:35 UTC, Brian Schott wrote:
* Hard limit for line length
* Soft limit for line length
offset for line wrap, e.g:
- right guide = 80;
- right tolerance = 10;
if line length = 84 then no new line
if line length = 91 then new line from the leftmost token
On Sat, 14 Mar 2015 18:44:02 -0700, Walter Bright wrote:
On 3/14/2015 5:01 PM, Orvid King wrote:
At which point you realize that The One True Way is wrong,
Maybe it's time to transcend that.
Correct me if I'm wrong, but I believe the purpose of a formatter is to
make the formatting of
2015-03-15 13:56 GMT+01:00 ketmar via Digitalmars-d
digitalmars-d@puremagic.com:
maybe it's time to fix the compiler, so it will simply reject the UnTrue
Sources? why relay to external tool for such fundamental task?
That would be terrible. They are thing the compiler should enforce (IMO
On Mon, 16 Mar 2015 02:37:46 +1300, Rikki Cattermole wrote:
On 16/03/2015 2:33 a.m., ketmar wrote:
On Mon, 16 Mar 2015 02:19:08 +1300, Rikki Cattermole wrote:
On 16/03/2015 2:16 a.m., ketmar wrote:
On Sun, 15 Mar 2015 16:32:25 +1300, Rikki Cattermole wrote:
This might be a bit of a out of
On Sun, 15 Mar 2015 14:49:35 +0100, Mathias Lang via Digitalmars-d wrote:
but One True Way would just lead to fork
exactly!
signature.asc
Description: PGP signature
On 16/03/2015 2:16 a.m., ketmar wrote:
On Sun, 15 Mar 2015 16:32:25 +1300, Rikki Cattermole wrote:
This might be a bit of a out of scope, but auto generating of DDOC
comments for symbols would be nice. Basically to enforce before e.g.
committing that everything has been explained.
this never
On Sun, 15 Mar 2015 16:32:25 +1300, Rikki Cattermole wrote:
This might be a bit of a out of scope, but auto generating of DDOC
comments for symbols would be nice. Basically to enforce before e.g.
committing that everything has been explained.
this never helps. what sense of having
On 16/03/2015 2:33 a.m., ketmar wrote:
On Mon, 16 Mar 2015 02:19:08 +1300, Rikki Cattermole wrote:
On 16/03/2015 2:16 a.m., ketmar wrote:
On Sun, 15 Mar 2015 16:32:25 +1300, Rikki Cattermole wrote:
This might be a bit of a out of scope, but auto generating of DDOC
comments for symbols would
On Mon, 16 Mar 2015 02:19:08 +1300, Rikki Cattermole wrote:
On 16/03/2015 2:16 a.m., ketmar wrote:
On Sun, 15 Mar 2015 16:32:25 +1300, Rikki Cattermole wrote:
This might be a bit of a out of scope, but auto generating of DDOC
comments for symbols would be nice. Basically to enforce before
On Sunday, 15 March 2015 at 09:10:13 UTC, Walter Bright wrote:
On 3/15/2015 1:12 AM, Jonathan M Davis via Digitalmars-d wrote:
Which would instantly make it useless for many users, because
many of them
will disagree with the One True Way regardless of what it
is. Tabs vs
spaces, BSD Allman
On Saturday, 14 March 2015 at 23:15:35 UTC, Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a
formatter for D source code.
So far I have the following:
* Insert spaces between if, while,
On Sunday, 15 March 2015 at 10:03:15 UTC, Walter Bright wrote:
Haven't we all got better things to do than argue about
formatting styles? If I was a manager paying programmers ,
I do not want to pay them to argue about formatting, either.
But this is exactly the point! There is a team
On Sunday, 15 March 2015 at 10:12:09 UTC, Dicebot wrote:
On Sunday, 15 March 2015 at 10:03:15 UTC, Walter Bright wrote:
Haven't we all got better things to do than argue about
formatting styles? If I was a manager paying programmers ,
I do not want to pay them to argue about formatting,
On Saturday, March 14, 2015 16:48:21 Walter Bright via Digitalmars-d wrote:
On 3/14/2015 4:15 PM, Brian Schott wrote:
What am I missing?
I suggest defining The One True Way and have no configuration options.
Which would instantly make it useless for many users, because many of them
will
On 3/15/2015 1:12 AM, Jonathan M Davis via Digitalmars-d wrote:
Which would instantly make it useless for many users, because many of them
will disagree with the One True Way regardless of what it is. Tabs vs
spaces, BSD Allman bracing vs KR bracing, if(...) vs if (...), ( test1
test2 ) vs
On 3/15/2015 2:38 AM, Dicebot wrote:
Walter, please understand, that no choice alone (in vacuum) is good or bad. One
true way was good decision for Go because it comes as part of consistent
opinionated approach to language design. It isn't just matter of formatting but
applies to all decisions -
Walter, please understand, that no choice alone (in vacuum) is
good or bad. One true way was good decision for Go because it
comes as part of consistent opinionated approach to language
design. It isn't just matter of formatting but applies to all
decisions - either you do what language
On Sunday, 15 March 2015 at 10:12:09 UTC, Dicebot wrote:
On Sunday, 15 March 2015 at 10:03:15 UTC, Walter Bright wrote:
Haven't we all got better things to do than argue about
formatting styles? If I was a manager paying programmers ,
I do not want to pay them to argue about formatting,
On Sunday, 15 March 2015 at 01:45:56 UTC, Walter Bright wrote:
On 3/14/2015 4:59 PM, Brian Schott wrote:
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright
wrote:
I suggest defining The One True Way and have no
configuration options.
I hope you like tabs as much as I do.
We'll all
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright wrote:
On 3/14/2015 4:15 PM, Brian Schott wrote:
What am I missing?
I suggest defining The One True Way and have no configuration
options.
One of the big benefits of auto-formatting is that people don't
have to agree on the correct
On Sunday, 15 March 2015 at 09:10:13 UTC, Walter Bright wrote:
On 3/15/2015 1:12 AM, Jonathan M Davis via Digitalmars-d wrote:
Which would instantly make it useless for many users, because
many of them
will disagree with the One True Way regardless of what it
is. Tabs vs
spaces, BSD Allman
On 3/15/2015 10:37 AM, Idan Arye wrote:
The thing is - gofmt was where from the very beginning of Go(or at least from
r56, the first stable release. I didn't dig any deeper...). This means that any
Go project was using the one true style from the beginning. dfmt, on the other
hand, comes out
On Saturday, 14 March 2015 at 23:15:35 UTC, Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a
formatter for D source code.
So far I have the following:
* Insert spaces between if, while,
On 03/15/2015 12:48 AM, Walter Bright wrote:
On 3/14/2015 4:15 PM, Brian Schott wrote:
What am I missing?
I suggest defining The One True Way and have no configuration options.
It's a bit late to enforce a particular D code style on all the existing
code and people already using D.
Something
On 3/14/2015 8:32 PM, Rikki Cattermole wrote:
This might be a bit of a out of scope, but auto generating of DDOC comments for
symbols would be nice. Basically to enforce before e.g. committing that
everything has been explained.
Autogeneration of documentation is by definition useless.
On Sunday, March 15, 2015 03:02:53 Walter Bright via Digitalmars-d wrote:
Haven't we all got better things to do than argue about formatting styles?
Sure, like we have better things than to argue about vim vs emacs. But I
wouldn't want to be forced to use emacs (or micro-emacs) just because
On 3/15/2015 3:12 AM, Dicebot wrote:
It is also matter of expectation. Until now D was very un-opinionated language,
probably even closer to language construction set. If this changes for one case,
one may fear more similar decisions may follow.
That's not entirely correct. For example, the
On Sunday, March 15, 2015 02:10:13 Walter Bright via Digitalmars-d wrote:
Let's _please_ not try and force any particular style on the D community.
Forcing is a little strong. dfmt is an optional tool, not the core language.
Yes, sorry. Forcing is too strong a word. However, if we're putting
On Sun, 15 Mar 2015 13:23:09 -0700, Jonathan M Davis via Digitalmars-d
wrote:
Yes, sorry. Forcing is too strong a word. However, if we're putting out
an official formatting tool which has no configurability, unless we're
telling folks that it's specifically for the official source code
and
On 16/03/2015 8:08 a.m., Walter Bright wrote:
On 3/14/2015 8:32 PM, Rikki Cattermole wrote:
This might be a bit of a out of scope, but auto generating of DDOC
comments for
symbols would be nice. Basically to enforce before e.g. committing that
everything has been explained.
Autogeneration of
On 3/15/2015 1:34 PM, Jonathan M Davis via Digitalmars-d wrote:
but I hate
it when I have to format code in ways that I don't like. It's like walking
around with a pebble in your shoe. It may not stop you from getting any work
done, but it's a constant point of pain.
I fully understand your
On Monday, 16 March 2015 at 01:52:57 UTC, Idan Arye wrote:
And if you need a more concrete reason - a code formatter
should be able to act as a filter - put code in STDIN, get
formatted code from STDOUT.
There are probably some languages where this will work, such as
Lua, but this will never
On Monday, 16 March 2015 at 00:13:58 UTC, Rikki Cattermole wrote:
On 16/03/2015 8:08 a.m., Walter Bright wrote:
On 3/14/2015 8:32 PM, Rikki Cattermole wrote:
This might be a bit of a out of scope, but auto generating of
DDOC
comments for
symbols would be nice. Basically to enforce before e.g.
On Saturday, 14 March 2015 at 23:15:35 UTC, Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a
formatter for D source code.
So far I have the following:
* Insert spaces between if, while,
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a
formatter for D source code.
So far I have the following:
* Insert spaces between if, while, for, foreach, etc loops and
the (
* Allman vs One True Brace
On 3/14/2015 4:59 PM, Brian Schott wrote:
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright wrote:
I suggest defining The One True Way and have no configuration options.
I hope you like tabs as much as I do.
We'll all have to compromise at some point to have a One True Way, but
On Sat, 14 Mar 2015 23:15:34 +, Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a formatter
for D source code.
So far I have the following:
* Insert spaces between if, while,
On 3/14/15 4:15 PM, Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a formatter
for D source code.
So far I have the following:
* Insert spaces between if, while, for, foreach, etc loops
On 3/14/2015 4:15 PM, Brian Schott wrote:
What am I missing?
I'd also suggest making dfmt an algorithm. Then people can use it like map,
reduce, filter, etc., in their programs. dfmt as a program then becomes
incidental and trivial.
On Saturday, 14 March 2015 at 23:15:35 UTC, Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a
formatter for D source code.
So far I have the following:
* Insert spaces between if, while,
Brian Schott wrote in message
news:iobidfcyoneyxrzkh...@forum.dlang.org...
First, a disclaimer: I am an idiot for starting this thread.
Hahaha.
What am I missing?
- Enum members each on new line or all on same line
- Threshold for array initializers, when exceeded each element is on
Andrei Alexandrescu wrote in message
news:me2orn$2fjp$1...@digitalmars.com...
I think a simple starting point would be to define and enforce
automatically one style for all phobos pull requests. -- Andrei
And with ddmd, we can do the same.
On Saturday, 14 March 2015 at 23:51:51 UTC, Walter Bright wrote:
On 3/14/2015 4:15 PM, Brian Schott wrote:
What am I missing?
I'd also suggest making dfmt an algorithm. Then people can use
it like map, reduce, filter, etc., in their programs. dfmt as a
program then becomes incidental and
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright wrote:
I suggest defining The One True Way and have no configuration
options.
I hope you like tabs as much as I do.
On 3/14/2015 5:01 PM, Orvid King wrote:
At which point you realize that The One True Way is wrong,
Maybe it's time to transcend that.
Correct me if I'm wrong, but I believe the purpose of a formatter is to make the
formatting of the code consistent in the way that the user wants it to be.
On 3/14/2015 4:58 PM, Brian Schott wrote:
On Saturday, 14 March 2015 at 23:51:51 UTC, Walter Bright wrote:
On 3/14/2015 4:15 PM, Brian Schott wrote:
What am I missing?
I'd also suggest making dfmt an algorithm. Then people can use it like map,
reduce, filter, etc., in their programs. dfmt as
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright wrote:
On 3/14/2015 4:15 PM, Brian Schott wrote:
What am I missing?
I suggest defining The One True Way and have no configuration
options.
At which point you realize that The One True Way is wrong, ask
for it to be changed, and are
On 3/14/15 6:45 PM, Walter Bright wrote:
On 3/14/2015 4:59 PM, Brian Schott wrote:
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright wrote:
I suggest defining The One True Way and have no configuration options.
I hope you like tabs as much as I do.
We'll all have to compromise at
On 15/03/2015 12:15 p.m., Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a formatter
for D source code.
So far I have the following:
* Insert spaces between if, while, for, foreach, etc
On 3/14/2015 4:15 PM, Brian Schott wrote:
What am I missing?
I suggest defining The One True Way and have no configuration options.
2015-03-15 0:15 GMT+01:00 Brian Schott via Digitalmars-d
digitalmars-d@puremagic.com:
What am I missing?
I suggest you fire a recent version of Visual Studio and go to tools /
Options / Tet editor / C# (or C/C++) / Formatting. There you got a bunch of
formatting options. Maybe not all of them
On Saturday, 14 March 2015 at 23:15:35 UTC, Brian Schott wrote:
First, a disclaimer: I am an idiot for starting this thread.
Moving on...
I'm working on a list of configuration options for dfmt - a
formatter for D source code.
So far I have the following:
* Insert spaces between if, while,
On Sunday, 15 March 2015 at 00:51:30 UTC, Meta wrote:
Maybe nobody else does this, but I prefer to write switch cases
in an indented block style.
switch (expr)
{
case 0:
//Do stuff
end;
case 1 .. case 9:
//Do other stuff
end;
default:
//Do default
70 matches
Mail list logo