D vs Rust: function signatures
Narrator via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 29 18:38:44 PDT 2014
The unbelievable amount of time and energy that's been spent
discussing the smallest syntax, you would think that D would, at
the very least, have better looking function signatures, but it
doesn't.
auto zip(Ranges...)(Ranges ranges) if (Ranges.length &&
allSatisfy!(isInputRange, Ranges));
auto zip(Ranges...)(StoppingPolicy sp, Ranges ranges) if
(Ranges.length && allSatisfy!(isInputRange, Ranges));
fn zip<B, U: Iterator<B>>(self, other: U) -> Zip<Self, U>
auto chain(Ranges...)(Ranges rs) if (Ranges.length > 0 &&
allSatisfy!(isInputRange, staticMap!(Unqual, Ranges)) &&
!is(CommonType!(staticMap!(ElementType, staticMap!(Unqual,
Ranges))) == void));
fn chain<U: Iterator<A>>(self, other: U) -> Chain<Self, U>
template map(fun...) if (fun.length >= 1)
auto map(Range)(Range r) if (isInputRange!(Unqual!Range));
fn map<'r, B>(self, f: |A|: 'r -> B) -> Map<'r, A, B, Self>
template filter(alias pred) if (is(typeof(unaryFun!pred)))
auto filter(Range)(Range rs) if (isInputRange!(Unqual!Range));
fn filter<'r>(self, predicate: |&A|: 'r -> bool) -> Filter<'r, A,
Self>
MaxType!(T1, T2, T) max(T1, T2, T...)(T1 a, T2 b, T xs) if
(is(typeof(a < b)));
pub fn max<T: TotalOrd>(v1: T, v2: T) -> T
More information about the Digitalmars-d
mailing list