On Friday, 4 December 2015 at 02:59:12 UTC, Steven Schveighoffer
wrote:
FWIW, I don't believe this complexity of API is worth it. It
may be you have all this wonderful mechanisms to specify
exactly the runtime requirements for your algorithms -- and
Big-Oh isn't particularly useful, but
On Friday, 4 December 2015 at 08:40:13 UTC, Ola Fosheim Grøstad
wrote:
Big-Oh isn't particularly useful, but having an upper bound on
actual running time is useful in real time programming.
And to avoid confusion: in real time applications _everything_ is
O(1). Anything worse than that is
On Friday, 4 December 2015 at 07:12:50 UTC, Jacob Carlborg wrote:
On 2015-12-03 22:02, Dicebot wrote:
And for that specific "stable" example - just make it a
separate module,
problem solved. To make use of module system for symbol
resolution one
needs to have many small modules, _that_ should
On Friday, 4 December 2015 at 06:57:17 UTC, Walter Bright wrote:
On 12/3/2015 12:59 PM, Dicebot wrote:
This isn't any different from namespace struct idiom, is it? I
don't like it
because it forces the namespace usage even if it isn't needed.
If you use mixin templates, you can use or not
On Friday, 4 December 2015 at 09:30:08 UTC, Walter Bright wrote:
I don't understand your comment that modules are broken. With
imports, you can use the module name as a prefix or not.
I am referring to Andrei proposal for template "namespaces" +
your explanation of how it can be flattened via
On 12/4/2015 12:48 AM, Dicebot wrote:
True, that didn't come to my mind. But that pushes resulting coding style from
"weird but tolerable" to "good luck explaining newbies why D modules are not
broken". All for the sake of a putting a dot in the name. Look at perspective
for a moment think if
On 12/04/2015 02:12 AM, Jacob Carlborg wrote:
On 2015-12-03 22:02, Dicebot wrote:
And for that specific "stable" example - just make it a separate module,
problem solved. To make use of module system for symbol resolution one
needs to have many small modules, _that_ should become D idiom.
I
On 12/04/2015 02:19 AM, Minas Mina wrote:
On Thursday, 3 December 2015 at 22:54:53 UTC, Andrei Alexandrescu wrote:
Nothing. But one thing I was keeping an eye for would be to allow
lst.stable.linear.xxx and lst.linear.stable.xxx with one body. -- Andrei
Please don't. Choose one to be the
Jacob Carlborg wrote:
> On 2015-12-04 15:00, Andrei Alexandrescu wrote:
>
>> How would one create a module inside a class or struct? -- Andrei
>
> Hmm, I see that I really didn't understand what you were trying to do.
> So you want to create a namespace inside a class or struct? I
On Friday, 4 December 2015 at 09:30:08 UTC, Walter Bright wrote:
On 12/4/2015 12:48 AM, Dicebot wrote:
True, that didn't come to my mind. But that pushes resulting
coding style from
"weird but tolerable" to "good luck explaining newbies why D
modules are not
broken". All for the sake of a
On Friday, 4 December 2015 at 20:58:02 UTC, tcak wrote:
On Friday, 4 December 2015 at 09:30:08 UTC, Walter Bright wrote:
On 12/4/2015 12:48 AM, Dicebot wrote:
[...]
I don't understand your comment that modules are broken. With
imports, you can use the module name as a prefix or not.
The
On 2015-12-04 15:00, Andrei Alexandrescu wrote:
How would one create a module inside a class or struct? -- Andrei
Hmm, I see that I really didn't understand what you were trying to do.
So you want to create a namespace inside a class or struct? I would
probably create a separate struct and
On 12/4/2015 1:35 AM, Dicebot wrote:
On Friday, 4 December 2015 at 09:30:08 UTC, Walter Bright wrote:
I don't understand your comment that modules are broken. With imports, you can
use the module name as a prefix or not.
I am referring to Andrei proposal for template "namespaces" + your
On 2015-12-03 23:54, Andrei Alexandrescu wrote:
Nothing. But one thing I was keeping an eye for would be to allow
lst.stable.linear.xxx and lst.linear.stable.xxx with one body. -- Andrei
How do you plan to differentiate the functionality?
--
/Jacob Carlborg
On Thursday, 3 December 2015 at 22:54:53 UTC, Andrei Alexandrescu
wrote:
Nothing. But one thing I was keeping an eye for would be to
allow lst.stable.linear.xxx and lst.linear.stable.xxx with one
body. -- Andrei
Please don't. Choose one to be the outer and one to be the inner.
Otherwise
On 12/03/2015 09:59 PM, Steven Schveighoffer wrote:
FWIW, I don't believe this complexity of API is worth it.
It's essential. -- Andrei
On 12/3/2015 1:05 PM, FreeSlave wrote:
When talking about namespaces in the C++ sense, the feature of namespace is that
it can be scattered among many files and can be 'using'.
I call that a bug, not a feature, since one loses all control over overloading
of names and encapsulation.
If
On 12/3/2015 1:29 PM, Andrei Alexandrescu wrote:
FWIW I wanted to use it to allow lst.linear.stable.insert() and
lst.stable.linear.insert() to refer to the same function, but this is not
working. Qualifies as a bug?
I don't want this to become a D idiom. It's too clever, too confusing, too
On 2015-12-03 22:02, Dicebot wrote:
And for that specific "stable" example - just make it a separate module,
problem solved. To make use of module system for symbol resolution one
needs to have many small modules, _that_ should become D idiom.
I agree. I will just be difficult to convince the
On 12/3/2015 12:59 PM, Dicebot wrote:
This isn't any different from namespace struct idiom, is it? I don't like it
because it forces the namespace usage even if it isn't needed.
If you use mixin templates, you can use or not use the namespace. prefix.
On 12/3/2015 2:54 PM, Andrei Alexandrescu wrote:
But one thing I was keeping an eye for would be to allow
lst.stable.linear.xxx and lst.linear.stable.xxx with one body. -- Andrei
lst.xxx!(stable, linear)
On 12/03/2015 04:05 PM, FreeSlave wrote:
I don't understand how it is namespace (it's just named scope for me)
and why do we need template for that? Probably struct with static
members would work the same without need for instantiating the template.
How would one use a struct for the List
On Thursday, 3 December 2015 at 21:29:51 UTC, Andrei Alexandrescu
wrote:
On 12/03/2015 04:05 PM, FreeSlave wrote:
I don't understand how it is namespace (it's just named scope
for me)
and why do we need template for that? Probably struct with
static
members would work the same without need for
On Thursday, 3 December 2015 at 21:46:03 UTC, Chris Wright wrote:
So maybe explicit namespaces within a module are justified
sometimes.
I definitely think that there are times when it's justified, but
I also think that they should be used sparingly. I think that the
only time that I've used
On 12/03/2015 05:46 PM, Steven Schveighoffer wrote:
On 12/3/15 3:51 PM, Andrei Alexandrescu wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more fluent, but it might have merit. Has anyone
explored it? Is it a viable
On Thursday, 3 December 2015 at 20:59:59 UTC, Dicebot wrote:
This isn't any different from namespace struct idiom, is it? I
don't like it because it forces the namespace usage even if it
isn't needed. There is something wrong with the module system
if one needs to resort to idioms like this.
On 12/3/15 3:51 PM, Andrei Alexandrescu wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more fluent, but it might have merit. Has anyone
explored it? Is it a viable candidate for becoming a D idiom?
I'm going to take a
On 12/03/2015 05:14 PM, Jonathan M Davis wrote:
You declare static functions on a struct or class and then make the
struct or class unusable as an object (e.g. by having a final abstract
class or explicitly disabling all ways to construct the struct or class).
I must be dense. Consider:
On Thursday, 3 December 2015 at 22:14:56 UTC, Jonathan M Davis
wrote:
On Thursday, 3 December 2015 at 21:29:51 UTC, Andrei
Alexandrescu wrote:
On 12/03/2015 04:05 PM, FreeSlave wrote:
[...]
How would one use a struct for the List example? There's no
access to "this". Yes, it's a named
On Thursday, 3 December 2015 at 20:51:02 UTC, Andrei Alexandrescu
wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more fluent, but it might have merit. Has
anyone explored it? Is it a viable candidate for becoming a D
On 12/3/15 5:54 PM, Andrei Alexandrescu wrote:
On 12/03/2015 05:46 PM, Steven Schveighoffer wrote:
On 12/3/15 3:51 PM, Andrei Alexandrescu wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more fluent, but it might have
On Thursday, 3 December 2015 at 20:51:02 UTC, Andrei Alexandrescu
wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more fluent, but it might have merit. Has
anyone explored it? Is it a viable candidate for becoming a D
And for that specific "stable" example - just make it a separate
module, problem solved. To make use of module system for symbol
resolution one needs to have many small modules, _that_ should
become D idiom.
On Thu, 03 Dec 2015 21:02:07 +, Dicebot wrote:
> And for that specific "stable" example - just make it a separate module,
> problem solved. To make use of module system for symbol resolution one
> needs to have many small modules, _that_ should become D idiom.
Usually the right answer, but
On Thursday, 3 December 2015 at 20:51:02 UTC, Andrei Alexandrescu
wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more fluent, but it might have merit. Has
anyone explored it? Is it a viable candidate for becoming a D
On Thursday, 3 December 2015 at 22:27:45 UTC, Andrei Alexandrescu
wrote:
On 12/03/2015 05:14 PM, Jonathan M Davis wrote:
You declare static functions on a struct or class and then
make the
struct or class unusable as an object (e.g. by having a final
abstract
class or explicitly disabling all
On Thursday, 3 December 2015 at 22:44:35 UTC, deadalnix wrote:
At work we started using abstract final classes a lot for this.
#notashamed
I used abstract final classes as well:
https://github.com/JinShil/stm32f42_discovery_demo/blob/master/source/stm32f42/gpio.d.
My use case is quite
On Thursday, 3 December 2015 at 22:54:53 UTC, Andrei Alexandrescu
wrote:
On 12/03/2015 05:46 PM, Steven Schveighoffer wrote:
On 12/3/15 3:51 PM, Andrei Alexandrescu wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more
On Thursday, 3 December 2015 at 22:44:35 UTC, deadalnix wrote:
At work we started using abstract final classes a lot for this.
which works just fine normally, but apparently, Andrei wants to
namespace member functions within a class or struct, which means
having access to a specific object
On Thursday, 3 December 2015 at 20:51:02 UTC, Andrei Alexandrescu
wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more fluent, but it might have merit. Has
anyone explored it? Is it a viable candidate for becoming a D
On Friday, 4 December 2015 at 01:09:07 UTC, Andrei Alexandrescu
wrote:
On 12/03/2015 08:04 PM, Idan Arye wrote:
People are going to hate me, but
http://dpaste.dzfl.pl/851d1d1f5e4b
Win :o). -- Andrei
Not win, we should feel ashamed that this is the kind of stuff
you have to do.
On 12/3/15 8:01 PM, Andrei Alexandrescu wrote:
On 12/03/2015 05:59 PM, Steven Schveighoffer wrote:
alias stableLinearXxx = linearStableXxx;
Doesn't scale. -- Andrei
To what? How many nested namespaces are you planning?
-Steve
On Thursday, 3 December 2015 at 20:51:02 UTC, Andrei Alexandrescu
wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more fluent, but it might have merit. Has
anyone explored it? Is it a viable candidate for becoming a D
On 12/03/2015 05:59 PM, Steven Schveighoffer wrote:
alias stableLinearXxx = linearStableXxx;
Doesn't scale. -- Andrei
On Thursday, 3 December 2015 at 20:59:59 UTC, Dicebot wrote:
There is something wrong with the module system if one needs to
resort to idioms like this.
I agree. These techniques blur the line between "idiom" and
"feature abuse". They're creative and sometimes the best or only
option, but
On 12/03/2015 08:04 PM, Idan Arye wrote:
People are going to hate me, but http://dpaste.dzfl.pl/851d1d1f5e4b
Win :o). -- Andrei
On Friday, 4 December 2015 at 01:04:33 UTC, Idan Arye wrote:
People are going to hate me, but
http://dpaste.dzfl.pl/851d1d1f5e4b
Doesn't seem to scale to member access:
http://dpaste.dzfl.pl/37193377524c
/d649/f987.d-mixin-3(7): Error: 'this' is only defined in
non-static member
On 12/04/2015 02:37 AM, Mike wrote:
On Friday, 4 December 2015 at 01:04:33 UTC, Idan Arye wrote:
People are going to hate me, but http://dpaste.dzfl.pl/851d1d1f5e4b
Doesn't seem to scale to member access: http://dpaste.dzfl.pl/37193377524c
/d649/f987.d-mixin-3(7): Error: 'this' is only
On Friday, 4 December 2015 at 01:37:35 UTC, Mike wrote:
On Friday, 4 December 2015 at 01:04:33 UTC, Idan Arye wrote:
People are going to hate me, but
http://dpaste.dzfl.pl/851d1d1f5e4b
Doesn't seem to scale to member access:
http://dpaste.dzfl.pl/37193377524c
/d649/f987.d-mixin-3(7):
On Thursday, 3 December 2015 at 20:51:02 UTC, Andrei Alexandrescu
wrote:
I vaguely remembered I saw something like this a while ago:
http://dpaste.dzfl.pl/f11894a098c6
The trick could be more fluent, but it might have merit. Has
anyone explored it? Is it a viable candidate for becoming a D
On 12/03/2015 10:29 PM, Andrei Alexandrescu wrote:
FWIW I wanted to use it to allow lst.linear.stable.insert() and
lst.stable.linear.insert() to refer to the same function, but this is
not working. Qualifies as a bug?
Yes. (It works with my own implementation of name lookup.)
On 12/03/2015 08:52 PM, Tofu Ninja wrote:
On Friday, 4 December 2015 at 01:09:07 UTC, Andrei Alexandrescu wrote:
On 12/03/2015 08:04 PM, Idan Arye wrote:
People are going to hate me, but http://dpaste.dzfl.pl/851d1d1f5e4b
Win :o). -- Andrei
Not win, we should feel ashamed that this is the
On 12/03/2015 08:59 PM, Steven Schveighoffer wrote:
On 12/3/15 8:01 PM, Andrei Alexandrescu wrote:
On 12/03/2015 05:59 PM, Steven Schveighoffer wrote:
alias stableLinearXxx = linearStableXxx;
Doesn't scale. -- Andrei
To what? How many nested namespaces are you planning?
Many functions,
On Friday, 4 December 2015 at 02:02:48 UTC, Timon Gehr wrote:
On 12/04/2015 02:37 AM, Mike wrote:
On Friday, 4 December 2015 at 01:04:33 UTC, Idan Arye wrote:
People are going to hate me, but
http://dpaste.dzfl.pl/851d1d1f5e4b
Doesn't seem to scale to member access:
On 12/3/15 9:20 PM, Andrei Alexandrescu wrote:
On 12/03/2015 08:59 PM, Steven Schveighoffer wrote:
On 12/3/15 8:01 PM, Andrei Alexandrescu wrote:
On 12/03/2015 05:59 PM, Steven Schveighoffer wrote:
alias stableLinearXxx = linearStableXxx;
Doesn't scale. -- Andrei
To what? How many nested
On Friday, 4 December 2015 at 02:24:32 UTC, Tofu Ninja wrote:
On Friday, 4 December 2015 at 02:02:48 UTC, Timon Gehr wrote:
On 12/04/2015 02:37 AM, Mike wrote:
On Friday, 4 December 2015 at 01:04:33 UTC, Idan Arye wrote:
People are going to hate me, but
http://dpaste.dzfl.pl/851d1d1f5e4b
On 12/04/2015 03:24 AM, Tofu Ninja wrote:
On Friday, 4 December 2015 at 02:02:48 UTC, Timon Gehr wrote:
On 12/04/2015 02:37 AM, Mike wrote:
On Friday, 4 December 2015 at 01:04:33 UTC, Idan Arye wrote:
People are going to hate me, but http://dpaste.dzfl.pl/851d1d1f5e4b
Doesn't seem to scale
On 12/03/2015 09:37 PM, Steven Schveighoffer wrote:
On 12/3/15 9:20 PM, Andrei Alexandrescu wrote:
On 12/03/2015 08:59 PM, Steven Schveighoffer wrote:
On 12/3/15 8:01 PM, Andrei Alexandrescu wrote:
On 12/03/2015 05:59 PM, Steven Schveighoffer wrote:
alias stableLinearXxx = linearStableXxx;
On 12/3/15 9:40 PM, Andrei Alexandrescu wrote:
On 12/03/2015 09:37 PM, Steven Schveighoffer wrote:
On 12/3/15 9:20 PM, Andrei Alexandrescu wrote:
On 12/03/2015 08:59 PM, Steven Schveighoffer wrote:
On 12/3/15 8:01 PM, Andrei Alexandrescu wrote:
On 12/03/2015 05:59 PM, Steven Schveighoffer
59 matches
Mail list logo