While reading std.range, I though that a ducktyping design without
language/library support can be quite fragile.
Consider the following example:
import std.stdio;
struct S
{
void shittyNameThatProbablyGetsRefactored() { };
}
void process(T)(T s)
{
static if(
Am 13.08.2010 19:01, schrieb simendsjo:
import std.stdio;
struct S
{
void shittyNameThatProbablyGetsRefactored() { };
}
void process(T)(T s)
{
static if( __traits(hasMember, T,
shittyNameThatProbablyGetsRefactored))
{
writeln(normal processing);
}
else
{
simendsjo wrote:
While reading std.range, I though that a ducktyping design without
language/library support can be quite fragile.
Consider the following example:
import std.stdio;
struct S
{
void shittyNameThatProbablyGetsRefactored() { };
}
void process(T)(T s)
{
static if(
On 8/13/10 10:01 AM, simendsjo wrote:
While reading std.range, I though that a ducktyping design without
language/library support can be quite fragile.
Consider the following example:
import std.stdio;
struct S
{
void shittyNameThatProbablyGetsRefactored() { };
}
void process(T)(T s)
{
On 08/13/2010 01:17 AM, dcoder wrote:
Hello. How do you declare and initialize a map that looks like the following:
Name = [ Personal Info]
Where personal info is type string[string].
I can't get this to compile. I'm wondering what I am doing wrong:
import std.stdio;
void main() {
On 13.08.2010 19:17, Steven Schveighoffer wrote:
On Fri, 13 Aug 2010 13:01:47 -0400, simendsjo
simen.end...@pandavre.com wrote:
While reading std.range, I though that a ducktyping design without
language/library support can be quite fragile.
Consider the following example:
import std.stdio;
On Fri, 13 Aug 2010 13:20:32 -0400, Ryan W Sims rws...@gmail.com wrote:
On 8/13/10 10:01 AM, simendsjo wrote:
While reading std.range, I though that a ducktyping design without
language/library support can be quite fragile.
Consider the following example:
import std.stdio;
struct S
{
void
On Fri, 13 Aug 2010 13:32:11 -0400, simendsjo simen.end...@pandavre.com
wrote:
On 13.08.2010 19:17, Steven Schveighoffer wrote:
On Fri, 13 Aug 2010 13:01:47 -0400, simendsjo
simen.end...@pandavre.com wrote:
While reading std.range, I though that a ducktyping design without
language/library
simendsjo napisał:
While reading std.range, I though that a ducktyping design without
language/library support can be quite fragile.
Consider the following example:
import std.stdio;
struct S
{
void shittyNameThatProbablyGetsRefactored() { };
}
void process(T)(T s)
{
static if(