On Tuesday, 12 July 2016 at 18:52:08 UTC, Meta wrote:
On Tuesday, 12 July 2016 at 04:23:07 UTC, Adam Sansier wrote:
Now, I could simply make Do a template method but then this
prevents it being a virtual function.
void Do(T)(T name) if (is(T == string) || is(T == int))
{
Init_Data();
On Tuesday, 12 July 2016 at 17:17:31 UTC, Kagamin wrote:
On Tuesday, 12 July 2016 at 16:30:05 UTC, Adam Sansier wrote:
Doesn't matter, it's not what I asked.
Yeah, I'm not confident I understood your problem right. You
can try to describe your problem better.
Criteria:
1. At most 2 one par
On Tuesday, 12 July 2016 at 18:52:08 UTC, Meta wrote:
On Tuesday, 12 July 2016 at 04:23:07 UTC, Adam Sansier wrote:
Now, I could simply make Do a template method but then this
prevents it being a virtual function.
void Do(T)(T name) if (is(T == string) || is(T == int))
{
Init_Data();
On Tuesday, 12 July 2016 at 04:23:07 UTC, Adam Sansier wrote:
Now, I could simply make Do a template method but then this
prevents it being a virtual function.
void Do(T)(T name) if (is(T == string) || is(T == int))
{
Init_Data();
static if (is(T == string))
{
...Get index
On Tuesday, 12 July 2016 at 16:30:05 UTC, Adam Sansier wrote:
Doesn't matter, it's not what I asked.
Yeah, I'm not confident I understood your problem right. You can
try to describe your problem better.
On Tuesday, 12 July 2016 at 16:42:52 UTC, Lodovico Giaretta wrote:
On Tuesday, 12 July 2016 at 16:30:05 UTC, Adam Sansier wrote:
Doesn't matter, it's not what I asked. Trying to provide
answers to a question that wasn't asked and was clearly stated
I wasn't interested in those types of answers.
On Tuesday, 12 July 2016 at 16:27:52 UTC, Adam Sansier wrote:
On Tuesday, 12 July 2016 at 13:54:16 UTC, Lodovico Giaretta
Also note that yield semantics as available in various
languages is much different from what you are proposing here.
Not really. Yield is usually a break in flow, regardles
On Tuesday, 12 July 2016 at 16:30:05 UTC, Adam Sansier wrote:
Doesn't matter, it's not what I asked. Trying to provide
answers to a question that wasn't asked and was clearly stated
I wasn't interested in those types of answers.
Every language has its own ways of solving various problems.
We a
On Tuesday, 12 July 2016 at 16:03:15 UTC, Kagamin wrote:
On Tuesday, 12 July 2016 at 13:44:02 UTC, Adam Sansier wrote:
I don't like it, creates an extra function for no apparent
reason except to get around the problem of not having a yield
type of semantic. Again, I wasn't asking for any ol' so
On Tuesday, 12 July 2016 at 13:54:16 UTC, Lodovico Giaretta wrote:
On Tuesday, 12 July 2016 at 13:44:02 UTC, Adam Sansier wrote:
On Tuesday, 12 July 2016 at 08:52:26 UTC, Kagamin wrote:
Extract functions for shared parts:
void Do(string name)
{
DoStuff();
int i = find(name);
DoStuf
On Tuesday, 12 July 2016 at 13:44:02 UTC, Adam Sansier wrote:
I don't like it, creates an extra function for no apparent
reason except to get around the problem of not having a yield
type of semantic. Again, I wasn't asking for any ol' solution,
there are many ways to skin this cat.
It's a no
On Tuesday, 12 July 2016 at 13:44:02 UTC, Adam Sansier wrote:
On Tuesday, 12 July 2016 at 08:52:26 UTC, Kagamin wrote:
Extract functions for shared parts:
void Do(string name)
{
DoStuff();
int i = find(name);
DoStuffWithIndex(i);
}
void Do(int name)
{
DoStuff();
DoStuffWith
On Tuesday, 12 July 2016 at 08:52:26 UTC, Kagamin wrote:
Extract functions for shared parts:
void Do(string name)
{
DoStuff();
int i = find(name);
DoStuffWithIndex(i);
}
void Do(int name)
{
DoStuff();
DoStuffWithIndex(i);
}
I don't like it, creates an extra function for no
Extract functions for shared parts:
void Do(string name)
{
DoStuff();
int i = find(name);
DoStuffWithIndex(i);
}
void Do(int name)
{
DoStuff();
DoStuffWithIndex(i);
}
I have a function that does some weird stuff, and can't really
change it to make life easier(due to how windows work, COM,
etc..).
The function normally takes a string, a name, and does its
think(which is the complex part that I can't change).
But I also want to overload it so the function t
15 matches
Mail list logo