Pages: 1 2 3 4 5
Author Topic: Subject  (387,815 Views)
Offline (Unknown gender) skarik

Member
Joined: Jul 2008
Posts: 46
View profile WWW
Reply #15 Posted on: July 27, 2009, 10:07:04 PM
struct a {} b;
b.a=0;

Do people actually have that happen?
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #16 Posted on: July 28, 2009, 02:12:24 AM
That's essentially the equivalent of doing:
int x;
x.int=0;
Offline (Unknown gender) skarik

Member
Joined: Jul 2008
Posts: 46
View profile WWW
Reply #17 Posted on: July 28, 2009, 05:31:38 PM
Why?
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #18 Posted on: July 29, 2009, 03:17:06 AM
I dunno; ask Josh.  He's seen things way crazier than I have or ever will.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #19 Posted on: July 29, 2009, 05:11:39 AM
It's worse than int x; x.whatever;

In that code, you at least have four bytes to work with. This offers nothing; the structure has no member by that name, and it certainly can't be treated as an integer, so ENIGMA really has nothing to do with that but error.
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #20 Posted on: July 29, 2009, 01:11:41 PM
I still don't get why someone would say int x; x.int=0;
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #21 Posted on: July 29, 2009, 04:21:19 PM
Because they're stupid. You can't just ignore possible stuff just because nobody would do it, you have to give an error.
Offline (Unknown gender) RetroX

Master of all things Linux
Contributor
Joined: Apr 2008
Posts: 1,055
View profile
Reply #22 Posted on: July 30, 2009, 03:00:33 AM
Quote from: Rusky on July 29, 2009, 04:21:19 PM
Because they're stupid. You can't just ignore possible stuff just because nobody would do it, you have to give an error.
Even GM doesn't do that completely, and they'll have at least 9000 more dumb users than we ever will.
Offline (Unknown gender) score_under

Member
Joined: Aug 2008
Posts: 308
View profile
Reply #23 Posted on: July 30, 2009, 01:18:03 PM
Quote from: RetroX on July 30, 2009, 03:00:33 AMat least 9000

No no no, it's "at least 100" or "over 9000", but not a mix of both! You may as well say "Last thursday we can has at least 9000 moar n00bs".
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #24 Posted on: July 30, 2009, 03:39:00 PM
How doesn't GM do it completely? If you do something that doesn't make sense, it errors. Saying x.var is a syntax error, saying x.player_obj is an unknown variable error.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #25 Posted on: July 30, 2009, 04:07:13 PM
And var xy; xy.a=0; will error "Undefined variable xy", even though you declared it. var x; errors that you can't redefine a builtin variable. Which is dumb. I may have to make EINGMA error if you say local int x; though.
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #26 Posted on: July 30, 2009, 06:44:59 PM
But xy is undefined. It's declared, but it has no value. Think of it in a dynamic typing sense, not a static one.
Offline (Unknown gender) notachair

Definitely not a chair
Contributor
Joined: Feb 2008
Posts: 299
View profile
Reply #27 Posted on: July 31, 2009, 07:33:45 AM
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #28 Posted on: July 31, 2009, 01:52:36 PM
Rusky-
Yes...

a2h-
1/x?
Offline (Unknown gender) score_under

Member
Joined: Aug 2008
Posts: 308
View profile
Reply #29 Posted on: July 31, 2009, 04:56:40 PM
Quote from: Josh @ Dreamland on July 31, 2009, 01:52:36 PM
a2h-
1/x?
Yes.
Pages: 1 2 3 4 5