It's debatable whether it should be mentioned in the user's guide. I don't think it makes sense to mention every single nuance of the language in the
user's guide.

The problem with these types of landmines is that you can document them until you are blue in the face, but unless the programmer both happens to read that particular warning, AND remember it 2 years later when he types in the particular construction for the first time, it's going to blow his foot off. Then it's an hour or two of frustration until he hits upon the cause of the problem.

This is particularly a problem in RealBasic, because there's no such thing as compile warnings.

This is why, given how rare it is that a programmer actually wants..

  Dim derf,dork,dweeb as new date

to create 3 references to a single object, and given that it can be replaced by..

  Dim derf as new date
  Dim dork,dweeb as date

  dork = derf
  dweeb = derf

that I would lobby that the multiple dim/new construction be made a compile error (with
a suitable message that explains the workaround).

The effects of this are:

1) a very small amount of valid code breaks when recompiled, but the fix is the work of a minute or two.

2) a probably larger amount of code that has a bug in it breaks, but now the programmer can fix this bug -- which is going to be one of those "bites 1 out of 1000 of users, and can never be reproduced" type of bugs that we hate so much.

3) Many future ankle amputations are avoided.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to