On 17.03.2014 23:33, Robert Schadek wrote:
On 03/17/2014 11:24 PM, H. S. Teoh wrote:
On Mon, Mar 17, 2014 at 11:16:12PM +0100, Robert Schadek wrote:
replace .. with : to make lexing easier, please
auto b = arr[(someCondition) ? w:x : y:z];
:-(
T
Thats a parsing problem.
1..1
On Monday, 17 March 2014 at 23:03:14 UTC, Robert Schadek wrote:
On 03/17/2014 11:43 PM, Timon Gehr wrote:
No, it does not. The lexer does not need to change.
you're right, but at some distant future I would like .. to be
replaced by :
Yes. I also like the .. notation in Dart where you keep
I just wrote a DIP aimed at improving slicing and range
construction syntax while maintaining backwards compatibility,
and I'd like to hear your opinions!
http://wiki.dlang.org/DIP58
It can be thought of as an elaboration on the approach discussed
here:
Mason McGill:
http://wiki.dlang.org/DIP58
Seems nice. But the syntax a..b..step is not very nice.
Bye,
bearophile
On Monday, 17 March 2014 at 17:41:16 UTC, bearophile wrote:
Mason McGill:
http://wiki.dlang.org/DIP58
Seems nice.
Thanks. There are a few awkward parts to maintain compatibility,
but that seems to be the only way to go.
But the syntax a..b..step is not very nice.
Do you not like the
On Monday, 17 March 2014 at 19:07:45 UTC, Mason McGill wrote:
On Monday, 17 March 2014 at 17:41:16 UTC, bearophile wrote:
Mason McGill:
http://wiki.dlang.org/DIP58
Seems nice.
Thanks. There are a few awkward parts to maintain
compatibility, but that seems to be the only way to go.
On Mon, Mar 17, 2014 at 07:07:44PM +, Mason McGill wrote:
On Monday, 17 March 2014 at 17:41:16 UTC, bearophile wrote:
Mason McGill:
http://wiki.dlang.org/DIP58
Seems nice.
Thanks. There are a few awkward parts to maintain compatibility,
but that seems to be the only way to go.
Random thought, but treating step as a template argument would
allow for some more interesting changes to the iterations,
though I can't think of any particular syntax that would look
good. And if you did add such a thing, then other operators
would want it as well.
Interesting, though I
On Monday, 17 March 2014 at 07:56:20 UTC, Mason McGill wrote:
I just wrote a DIP aimed at improving slicing and range
construction syntax while maintaining backwards compatibility,
and I'd like to hear your opinions!
http://wiki.dlang.org/DIP58
It can be thought of as an elaboration on the
On Monday, 17 March 2014 at 19:58:40 UTC, H. S. Teoh wrote:
On Mon, Mar 17, 2014 at 07:07:44PM +, Mason McGill wrote:
On Monday, 17 March 2014 at 17:41:16 UTC, bearophile wrote:
Mason McGill:
http://wiki.dlang.org/DIP58
Seems nice.
Thanks. There are a few awkward parts to maintain
On Monday, 17 March 2014 at 07:56:20 UTC, Mason McGill wrote:
I just wrote a DIP aimed at improving slicing and range
construction syntax while maintaining backwards compatibility,
and I'd like to hear your opinions!
http://wiki.dlang.org/DIP58
It can be thought of as an elaboration on the
On Monday, 17 March 2014 at 20:13:20 UTC, Mason McGill wrote:
Interesting, though I feel like operator syntax really shines
when either
1) It's significantly shorter/simpler than the equivalent
function calls.
2) It appeals to domain-specific intuitions.
In general, I agree. Though I
It's a nice proposal, but what happens if you want a range of
floats, e.g., 1.0..2.0?
Correct me if I'm wrong, parsing would look like:
1.0..2.0
=== Found a literal.
1.0..2.0
==Found a binary operator.
1.0..2.0
=== Found a literal.
replace .. with : to make lexing easier, please
On Mon, Mar 17, 2014 at 11:16:12PM +0100, Robert Schadek wrote:
replace .. with : to make lexing easier, please
auto b = arr[(someCondition) ? w:x : y:z];
:-(
T
--
Computers aren't intelligent; they only think they are.
On 03/17/2014 11:24 PM, H. S. Teoh wrote:
On Mon, Mar 17, 2014 at 11:16:12PM +0100, Robert Schadek wrote:
replace .. with : to make lexing easier, please
auto b = arr[(someCondition) ? w:x : y:z];
:-(
T
Thats a parsing problem.
1..1 makes you think you got a prefix of a float 1.
On Mon, Mar 17, 2014 at 11:33:38PM +0100, Robert Schadek wrote:
On 03/17/2014 11:24 PM, H. S. Teoh wrote:
On Mon, Mar 17, 2014 at 11:16:12PM +0100, Robert Schadek wrote:
replace .. with : to make lexing easier, please
auto b = arr[(someCondition) ? w:x : y:z];
:-(
T
Thats a
On 03/17/2014 11:37 PM, H. S. Teoh wrote:
1..1 makes you think you got a prefix of a float 1. but actually you
got an int slice_operator int. If there where no .. flex like
generator could handle D, at least as far as I can see it.
Point.
But still, syntax that makes lexing or parsing hard --
On Monday, 17 March 2014 at 22:21:46 UTC, Robert Schadek wrote:
replace .. with : to make lexing easier, please
+1
On 03/17/2014 11:43 PM, Timon Gehr wrote:
No, it does not. The lexer does not need to change.
you're right, but at some distant future I would like .. to be replaced
by :
On Monday, 17 March 2014 at 22:26:05 UTC, H. S. Teoh wrote:
On Mon, Mar 17, 2014 at 11:16:12PM +0100, Robert Schadek wrote:
replace .. with : to make lexing easier, please
auto b = arr[(someCondition) ? w:x : y:z];
:-(
T
Julia has both the ternary conditional and : as an
21 matches
Mail list logo