Jonathan M Davis:
Well, it _does_ follow the language spec, so it's not broken in
that sense, but it's a broken design IMHO in that it causes
confusion and bugs, and it has resulted in complaints in the
past
and will continue to do so until it's changed. So, I do think
that it's true that
On Saturday, 16 August 2014 at 21:42:59 UTC, Jonathan M Davis
wrote:
On Saturday, 16 August 2014 at 18:50:08 UTC, Jacob Carlborg
wrote:
On 2014-08-16 01:33, Mike wrote:
Sounds like a worthwhile impromement to me.
Sounds like a breaking change to me. Which will include the
usual complains.
On 2014-08-16 01:33, Mike wrote:
Sounds like a worthwhile impromement to me.
Sounds like a breaking change to me. Which will include the usual complains.
--
/Jacob Carlborg
On 8/16/2014 11:50 AM, Jacob Carlborg wrote:
On 2014-08-16 01:33, Mike wrote:
Sounds like a worthwhile impromement to me.
Sounds like a breaking change to me. Which will include the usual complains.
Yes, and for this case it is not worth it.
On Saturday, 16 August 2014 at 19:23:48 UTC, Walter Bright wrote:
Yes, and for this case it is not worth it.
This shows one more time that D needs a tool (similar to gofix)
that allows automatic conversion of source code compatible with
version x to code compatible with version x + 1.
On Saturday, 16 August 2014 at 18:50:08 UTC, Jacob Carlborg wrote:
On 2014-08-16 01:33, Mike wrote:
Sounds like a worthwhile impromement to me.
Sounds like a breaking change to me. Which will include the
usual complains.
Yes, but it's either that or have people running into this
problem
On Saturday, 16 August 2014 at 18:50:08 UTC, Jacob Carlborg wrote:
On 2014-08-16 01:33, Mike wrote:
Sounds like a worthwhile impromement to me.
Sounds like a breaking change to me. Which will include the
usual complains.
... and not breaking it will include the same complaints years
from
On Saturday, 16 August 2014 at 19:23:48 UTC, Walter Bright wrote:
On 8/16/2014 11:50 AM, Jacob Carlborg wrote:
On 2014-08-16 01:33, Mike wrote:
Sounds like a worthwhile impromement to me.
Sounds like a breaking change to me. Which will include the
usual complains.
Yes, and for this case
On Sat, 16 Aug 2014 12:23:49 -0700
Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote:
Yes, and for this case it is not worth it.
it worth it. we can fix alot of such things while our userbase is
relatively small. we will be doomed to live with this legacy when
userbase becomes
On Saturday, 16 August 2014 at 19:43:36 UTC, Fool wrote:
On Saturday, 16 August 2014 at 19:23:48 UTC, Walter Bright
wrote:
Yes, and for this case it is not worth it.
This shows one more time that D needs a tool (similar to gofix)
that allows automatic conversion of source code compatible
On Saturday, 16 August 2014 at 23:39:59 UTC, Mike wrote:
On Saturday, 16 August 2014 at 18:50:08 UTC, Jacob Carlborg
wrote:
On 2014-08-16 01:33, Mike wrote:
Sounds like a worthwhile impromement to me.
Sounds like a breaking change to me. Which will include the
usual complains.
... and
On Sunday, 17 August 2014 at 02:44:26 UTC, Mike wrote:
On Saturday, 16 August 2014 at 23:39:59 UTC, Mike wrote:
On Saturday, 16 August 2014 at 18:50:08 UTC, Jacob Carlborg
wrote:
On 2014-08-16 01:33, Mike wrote:
Sounds like a worthwhile impromement to me.
Sounds like a breaking change to
This may be a silly issue, but I recently read the better
practice is to begin with the variable type followed by const
keyword, but that order doesn't work in D. Is that intentional?
int const minWage = 11; //Error: no identifier for declarator
int
//const int minWage = 11; //works
On Friday, 15 August 2014 at 17:05:55 UTC, John wrote:
This may be a silly issue, but I recently read the better
practice is to begin with the variable type followed by const
keyword, but that order doesn't work in D. Is that intentional?
int const minWage = 11; //Error: no identifier for
On Friday, 15 August 2014 at 17:16:45 UTC, Sean Kelly wrote:
On Friday, 15 August 2014 at 17:05:55 UTC, John wrote:
This may be a silly issue, but I recently read the better
practice is to begin with the variable type followed by const
keyword, but that order doesn't work in D. Is that
On Friday, 15 August 2014 at 17:05:55 UTC, John wrote:
This may be a silly issue, but I recently read the better
practice is to begin with the variable type followed by const
keyword, but that order doesn't work in D. Is that intentional?
int const minWage = 11; //Error: no identifier for
On Fri, Aug 15, 2014 at 05:05:53PM +, John via Digitalmars-d wrote:
This may be a silly issue, but I recently read the better practice is
to begin with the variable type followed by const keyword, but that
order doesn't work in D. Is that intentional?
int const minWage = 11; //Error:
On 08/15/2014 07:18 PM, John wrote:
btw, it works either way if I use auto
auto const minWage = 11; //works
const auto minWage = 11; //works
...
auto does not serve any purpose here.
The same flexibility is missing when the actual type is used.
In particular, auto is not a wild-card type
On 8/15/2014 10:45 AM, H. S. Teoh via Digitalmars-d wrote:
Nah, the better practice is to write const(int) instead of const int,
which is ambiguous when used to specify a function's return value.
For example,
const int func();
is *not* the same as:
const(int) func();
which
On Friday, 15 August 2014 at 18:47:49 UTC, Walter Bright wrote:
On 8/15/2014 10:45 AM, H. S. Teoh via Digitalmars-d wrote:
It is not ambiguous from a semantic or syntactic point of view,
but it appears to be ambiguous for those coming from C++. This
I like this example from the C world:
On 8/15/2014 12:06 PM, eles wrote:
But, I agree, I am a follower of the rule:
const is written after and applies to everything that comes left of it.
That rule can never work for D. Remember, D's const is transitive.
On Friday, 15 August 2014 at 19:14:10 UTC, Walter Bright wrote:
On 8/15/2014 12:06 PM, eles wrote:
That rule can never work for D. Remember, D's const is
transitive.
Thank you. I was aware. I was speaking about my C-style.
On Friday, 15 August 2014 at 18:47:49 UTC, Walter Bright wrote:
It is not ambiguous from a semantic or syntactic point of view,
but it appears to be ambiguous for those coming from C++. This
was discussed at length a few years ago, but no solution
emerged that didn't make things much worse.
On Friday, 15 August 2014 at 18:23:47 UTC, Timon Gehr wrote:
On 08/15/2014 07:18 PM, John wrote:
btw, it works either way if I use auto
auto const minWage = 11; //works
const auto minWage = 11; //works
...
auto does not serve any purpose here.
The same flexibility is missing when the
On Fri, 15 Aug 2014 21:08:08 +
Jonathan M Davis via Digitalmars-d digitalmars-d@puremagic.com wrote:
I still think that we'd be far better off if all attributes which
could apply to a function's return type were illegal on the
left-hand side of the function.
i completely agree. even if
On Fri, Aug 15, 2014 at 09:08:08PM +, Jonathan M Davis via Digitalmars-d
wrote:
On Friday, 15 August 2014 at 18:47:49 UTC, Walter Bright wrote:
It is not ambiguous from a semantic or syntactic point of view, but
it appears to be ambiguous for those coming from C++. This was
discussed at
On Friday, 15 August 2014 at 21:08:10 UTC, Jonathan M Davis wrote:
I still think that we'd be far better off if all attributes
which could apply to a function's return type were illegal on
the left-hand side of the function. All allowing it on the left
does is cause confusion and bugs. It's
27 matches
Mail list logo