View previous topic :: View next topic |
Author |
Message |
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Thu Aug 17, 2006 10:45 pm Post subject: August 17th - lines, lines, lines, LINES, LINES |
|
|
I spent an hour and a half putting in the line info generation into the compiler. It wasn't that difficult - just really, really tedious and repetitive. But it does seem to work nicely. Now the interpreter can issue more meaningful error messages (didn't get around to coding that yet though). I've also been thinking of implementing a "function name guess" as part of the debug info. Since functions aren't associated with a name, it can try to take a guess at what it's called, based on how it was defined. Would definitely make for some better error messages.
By the way, did I mention that I don't like how D allows for implicit conversion from enum to int/uint? I really hate it, in fact.
Lastly - this week has been really busy, and this weekend will be even busier, so there might not be much/any work done over the next couple of days, and what's worse - I might not have an internet connection for a couple of days after I move into my apartment. |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Sat Aug 19, 2006 1:08 am Post subject: |
|
|
If the implicit enum promotion is a problem (I suppose for function specializations or such?) you could do something like this:
Code: |
enum _MyEnum_ : uint { Alpha, Beta, Gamma, Delta, Epsilon }
typedef _MyEnum_ MyEnum ;
void foo (uint x) { ... }
void foo (MyEnum x) { ... }
|
Not elegant in the strictest sense, but effective. _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Sat Aug 19, 2006 6:40 am Post subject: |
|
|
You're right, I was having trouble with function overloading. That's a good idea, thanks |
|
Back to top |
|
|
hasan
Joined: 02 May 2005 Posts: 58
|
Posted: Sun Aug 20, 2006 3:14 am Post subject: |
|
|
csauls wrote: | If the implicit enum promotion is a problem (I suppose for function specializations or such?) you could do something like this:
Code: |
enum _MyEnum_ : uint { Alpha, Beta, Gamma, Delta, Epsilon }
typedef _MyEnum_ MyEnum ;
void foo (uint x) { ... }
void foo (MyEnum x) { ... }
|
Not elegant in the strictest sense, but effective. |
omg, this reminds me of the lovely (read: crappy) C style struct declaration:
Code: |
typedef _myStruct { .... } myStruct;
|
|
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Sun Aug 20, 2006 11:03 am Post subject: |
|
|
Sadly, that's basically what it is. *sigh* _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|