This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 143466 - Language change: Variable declarations
Summary: Language change: Variable declarations
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: David Strupl
URL:
Keywords:
: 144394 (view as bug list)
Depends on:
Blocks: 130138
  Show dependency tree
 
Reported: 2008-08-11 14:04 UTC by David Strupl
Modified: 2008-09-19 10:06 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Strupl 2008-08-11 14:04:34 UTC
The keywords "var" and "def" are used for declaring variables everywhere; the keywords "attribute" and "static" are
going away.  Variables declared inside a class are what used to be called attributes; variables defined at script level
are what used to be called statics; variables inside code blocks are local variables.  "Def" can be used wherever "var"
can, and it is an error to subsequently assign a value to a variable defined with "def".  Defs may be bound (which means
they are not truly constant.)  Status: var and def are valid anywhere, no warning yet for using "attribute" instead of
var, warning for using "static".  Static attributes should be turned into top-level vars or defs.
Comment 1 David Strupl 2008-08-19 09:07:03 UTC
The code completion must be updated to suggest proper keywords.
Comment 2 David Strupl 2008-08-19 14:19:28 UTC
*** Issue 144394 has been marked as a duplicate of this issue. ***
Comment 3 David Strupl 2008-09-08 13:10:52 UTC
After this revision 
http://hg.netbeans.org/javafx/rev/48b4c3b55c2e
we should suggest var and def. The rest will be tracked as bugs.
Comment 4 Alexandr Scherbatiy 2008-09-19 10:06:43 UTC
verified in 2008-09-19_02-01-58.zip