I use Emacs and replace regexp.
Hi,
I'm looking for a solution that replaces just in the scope. A regexp
replace would change all occurrences :( Also, if you have a function
that is implemented in a module and you call it in another file, it
should be renamed everywhere.
Laszlo
On Sun, 06 Nov 2011 04:39:28 -, Jude Young 10equa...@gmail.com wrote:
Nice. Exactly what I was looking for.
I knew I was missing something tiny.
Now I just need to figure out why that works and I can say I've learned
something!
Thanks guys,
Jude
On Sat, Nov 5, 2011 at 5:38 AM, bearophile
On 06-11-2011 21:36, Ellery Newcomer wrote:
On 11/06/2011 01:50 PM, Alex Rønne Petersen wrote:
On 06-11-2011 20:43, Ellery Newcomer wrote:
poking about in elfutils headers, I've come across the following idiom
several times
/* Error values. */
enum
{
DW_TAG_invalid = 0
#define
class Foo
{
@property void test(int) {}
@property int test() { return 1; }
}
class Bar : Foo
{
alias super.test test;
override @property void test(int) {}
void bartest() { auto x = test; }
}
And it actually works! Is this a documented feature?
On Sun, 06 Nov 2011 23:10:57 -0500, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
I've had a simple problem where I've only wanted to override a setter
from a base class:
class Foo
{
@property void test(int) {}
@property int test() { return 1; }
}
class Bar : Foo
{
override
Regan Heath wrote:
You've also got std.ascii.digits which is 0123456789 and
std.string.digits which is an alias of it, so you can say:
import std.ascii; (or std.string)
int x = 5;
char c = std.ascii.digits[x];
I used similar solution to bearophile's before. I must admit i did not know
Cool stuff, thanks guys. This thing kicks some serious C++ ass. ^^
Cool stuff, thanks guys. This thing kicks some serious C++ ass. ^^
How? You can use using in C++ to do the same.
On 11/7/11, Trass3r u...@known.com wrote:
Cool stuff, thanks guys. This thing kicks some serious C++ ass. ^^
How? You can use using in C++ to do the same.
My bad. I was a bit over-excited there. :p
On 11/07/2011 12:26 AM, Jesse Phillips wrote:
I'm sure if this was changed there would be other interesting behavior,
such as arrays being consumed. And suggestions other than
for(S s; !s.empty, s.popFront())...
Example:
void main() {
S s;
foreach(i; s) {
Hello.
I know D isn't Java, but one trivial thing I liked about Java is
the introduction of 'extends' and 'implements' as keywords as ways
to clarify the class relationships when defining a class. You
know:
class Subclass extends SuperClass implements AnInterface {
...
}
Will they ever add
On Mon, 07 Nov 2011 13:22:07 -0500, %u n...@devnull.com wrote:
Hello.
I know D isn't Java, but one trivial thing I liked about Java is
the introduction of 'extends' and 'implements' as keywords as ways
to clarify the class relationships when defining a class. You
know:
class Subclass extends
If you need some kind of textual information on whether its a class or
an interface, you can name your interfaces with an I.
interface IShape
{
}
abstract class Drawable
{
}
class Rectangle : IShape, Drawable {}
It's pretty common in other languages, I've seen it used in D as well.
On 07-11-2011 19:22, %u wrote:
Hello.
I know D isn't Java, but one trivial thing I liked about Java is
the introduction of 'extends' and 'implements' as keywords as ways
to clarify the class relationships when defining a class. You
know:
class Subclass extends SuperClass implements
You can do this and/or use the convention of extends first, implements
second:
class Rectangle : Drawable, IShape, IOtherInterface {}
If you're really concerned about clarity, use comments:
class Rectangle : /* extends */ Drawable,
/* implements */ IShape
{
}
Andrej Mitrovic
You can do this and/or use the convention of extends first, implements
second:
class Rectangle : Drawable, IShape, IOtherInterface {}
It's not a convention, the spec demands that.
http://d-programming-language.org/class.html
If you're really concerned about clarity, use comments:
class
On 11/05/2011 03:23 PM, bearophile wrote:
Tobias Pankrath:
I do like it, just it would be nice to have an alternative in phobos, iff there is
no other way I am not aware of.
Type tuples (that are allowed to contain more than just types) aren't Phobos
constructs, they are built-in in the
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Mon, 07 Nov 2011 13:22:07 -0500, %u n...@devnull.com wrote:
In order for such a humongously code-breaking change to occur,
there would
have to be dire reasons why this was necessary. Because you
liked Java is
not a
On Mon, 07 Nov 2011 14:07:56 -0500, %u n...@.com wrote:
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Mon, 07 Nov 2011 13:22:07 -0500, %u n...@devnull.com wrote:
In order for such a humongously code-breaking change to occur,
there would
have to be dire reasons why
Andrej Mitrovic wrote:
class Rectangle : IShape, Drawable {}
It's pretty common in other languages, I've seen it used in D as well.
I used the same naming convention for interfaces until I saw this
presentation: http://www.infoq.com/presentations/It-Is-Possible-to-Do-OOP-
in-Java (jump to
Came across this when trying to get Juno to work. Is there a good workaround
for it?
http://d.puremagic.com/issues/show_bug.cgi?id=6906
test.d(6): Error: function test.S.opAssign (int i) is not callable using
argument types (S)
void main() {
S[string] ss;
S s;
On 07/11/2011 20:27, Jesse Phillips wrote:
Came across this when trying to get Juno to work. Is there a good workaround
for it?
http://d.puremagic.com/issues/show_bug.cgi?id=6906
test.d(6): Error: function test.S.opAssign (int i) is not callable using
argument types (S)
void main() {
import std.stdio;
void main()
{
int y;
switch (y)
{
case 0:
{
// no warning here on fallthrough
}
case 1:
{
goto case 2;
}
case 2:
{
writeln(2);
break;
}
On Monday, November 07, 2011 15:38 Andrej Mitrovic wrote:
import std.stdio;
void main()
{
int y;
switch (y)
{
case 0:
{
// no warning here on fallthrough
}
case 1:
{
goto case 2;
}
case 2:
{
writeln(2);
break;
}
default:
}
}
This won't trigger any warnings when
Andrej Mitrovic:
I did have a bug pop up because I was relying on this new fallthrough
warning system, but it failed to warn me because I didn't have a
statement in one of my cases (I forgot to put a break).
-.- This is the consequence of special cases piled on special cases, in the D
On Mon, 07 Nov 2011 20:59:05 +, Richard Webb wrote:
I have a recollection that i replaced an opAssign with a custom assign
function when getting Juno to build with D2 a while ago because of
something like this (was in the MethodProxy struct in com.client). That
did hit a different DMD bug
On Mon, 07 Nov 2011 18:22:07 +, %u wrote:
Hello.
I know D isn't Java, but one trivial thing I liked about Java is the
introduction of 'extends' and 'implements' as keywords as ways to
clarify the class relationships when defining a class. You know:
class Subclass extends SuperClass
On Mon, 07 Nov 2011 18:52:19 +0100, Timon Gehr wrote:
Expected, s has value semantics.
for(S _s=s; !_s.empty(); _s.popFront()){
auto i = _s.front();
// assert(i == s.popCount()); // expected to fail.
}
Yes thank you. I was just hoping to have access to _s inside the loop.
And
On 2011-11-07 20:36, Dejan Lekic wrote:
Andrej Mitrovic wrote:
class Rectangle : IShape, Drawable {}
It's pretty common in other languages, I've seen it used in D as well.
I used the same naming convention for interfaces until I saw this
presentation:
On 2011-11-08 03:07, Jesse Phillips wrote:
On Mon, 07 Nov 2011 18:22:07 +, %u wrote:
Hello.
I know D isn't Java, but one trivial thing I liked about Java is the
introduction of 'extends' and 'implements' as keywords as ways to
clarify the class relationships when defining a class. You
30 matches
Mail list logo