the new
lambdas
work.
Cheers,
Pillsy
strategies at *runtime*, which strikes me as a
fairly esoteric use case.
Cheers,
Pillsy
along the lines of
boost::proto/boost::lambda to allow even
shorter, expression-based lambdas like
_1 + _2
I'm not exactly a D template metaprogramming pro, but I think this would work
for a lot of common cases.
Cheers, Pillsy
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
On 9/22/11 10:42 AM, pillsy wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
[...]
Already does. We're looking for a briefer syntax.
What is the problem with just inferring
void, or an explicit
return statement can still be used. The less ceremony necessary to define a
function, the better, IMO.
Cheers, Pillsy
that takes a suitable
default value allow you to hack
around this?
Cheers,
Pillsy
and string mixins. Right now
you have to do hacky and not-terribly-robust things to synthesize
unique IDs out of __FILE__ and __LINE__.
Cheers,
Pillsy
I've made suggested changes, please review again.
I like this design. Thanks for proposing it.
Cheers,
Pillsy
for generic programming out of their
statically typed languages. Java and C# had to graft generics onto their
languages after the fact; why ignore that?
Cheers,
Pillsy
uriel_follower wrote:
Pillsy Wrote:
[...]
At this point I'm mystified as to why language designers just keep
on making this same mistake by leaving support for generic
programming out of their statically typed languages. Java and C#
had to graft generics onto their languages after
` keyword for things other
than varargs, like closures.
Cheers,
Pillsy
bearophile wrote:
Pillsy:
[...]
It has one other advantage, in that you can use the `scope`
keyword for things other than varargs, like closures.
That scope syntax is already supported for closures, and it's partially
implemented (or fully implemented, I am not sure).
Oh, cool. I had
the main reason for having
it isn't there.
Either way, it's not exactly a make or break feature.
Cheers,
Pillsy
they
had this behavior. The fact that they don't makes me a good deal more
comfortable with them, though I still don't like the non-deterministic way that
they may copy their elements or they may share structure after you append stuff
to them.
Cheers,
Pillsy
Steven Schveighoffer Wrote:
On Tue, 09 Nov 2010 08:14:40 -0500, Pillsy pillsb...@gmail.com wrote:
[...]
Ah! This is a lot of what was confusing me about arrays; I still thought
they had this behavior. The fact that they don't makes me a good deal
more comfortable with them, though I
lower level and more static D is as a language.
[1] From a marketing perspective, they're also great way to show off how
using a GCed language can actually improve performance and memory use.
Cheers,
Pillsy
is that `this(this)` gives programmers what
they need to do reference counting themselves when they need it to get their
value types right.
Cheers,
Pillsy
collection, making strings
immutable...?
D is as much Java++ as it is C+=2.
Cheers,
Pillsy
themselves in the foot by having this(this) open an HTTP collection to
Alpha Centauri if that's what they really want.
Cheers,
Pillsy
as a bad plan.
Cheers,
Pillsy
multimethods---would be a huge addition.
Cheers,
Pillsy
[1] The open multimethods described in
http://www2.research.att.com/~bs/multimethods.pdf
are very similar to Dylan's generic functions. They don't have a lot to do
with generics or generic programming.
handling concerns of
constness and sharedness and the like properly.
Cheers,
Pillsy
want is how you end up with
nightmares like Scheme's call-with-current-continuation, but letting
1 use case in 10 drop on the floor makes the cost/benefit ratio of
learning your library or language really dubious.
[...]
Cheers,
Pillsy
you to treat an immutable
reference type exactly like a value type.
Cheers,
Pillsy
for RandomAccess ranges).
The key idea is that these cursors aren't a primitive part of a range; instead,
they take a range and add a position *inside* the range. They're a perfect fit
for all those three-legged operations out there because they actually have
three legs.
Cheers,
Pillsy
Steven Schveighoffer Wrote:
On Thu, 26 Aug 2010 10:18:51 -0400, Pillsy pillsb...@gmail.com
wrote:
[...]
The key idea is that these cursors aren't a primitive part of a
range; instead, they take a range and add a position *inside*
the range. They're a perfect fit for all those three
in a hundred, is it really that bad?
Cheers,
Pillsy
you can use an expression.
I'd love a bit of syntactic sugar for the idiom, that would do the same thing
the Lisp LET does, transforming
let (x = a, y = b) { foo(x); bar(y); return quux(x, y); }
into
(x, y){ foo(x); bar(y); return quux(x, y); }(a, b)
automatically.
Cheers,
Pillsy
conceivable pair of
names better, like make/unmake, create/destroy, build/smash, whatever.
Cheers,
Pillsy
to understand string manipulation
where the end result is the language I already know, vs.
having to learn how the compiler represents syntax.
String manipulation scales very poorly, it's error prone, and it's
tedious.
Cheers,
Pillsy
need to be in order to allow people to
build a really useful macro
system in libraries.
Cheers,
Pillsy
[...]
that it's the part of the language which needs the
most attention in the long term. But the way forward is not at all
obvious. So it's been deferred.
I'm not clear on how one is supposed to go about making the equivalent of
hygienic macros using just
string mixins and CTFE.
Cheers,
Pillsy
,
Pillsy
both the containers and
the smart pointers a good deal more useful.
Cheers,
Pillsy
[1] I asked some questions about the feasibility of this in d.learn.
and
(presumably) GC'd as a single block. If I copy a 1000 element list
and then remove 999 elements from the front using removeFront(),
won't I end up leaking memory for the first 999 nodes?
Cheers,
Pillsy
a hasDestructor template would be a good thing
to have in the standard library.
Cheers,
Pillsy
on
vec is legitimate
according to
http://www.digitalmars.com/d/2.0/arrays.html
and the fact that the program bombs out regardless of the outcome of the test
in the conditional is
particularly mystifying.
Any help would be greatly appreciated.
Thanks,
Pillsy
37 matches
Mail list logo