Why Field?

BlitzMax Forums/BlitzMax Programming/Why Field?

Hotcakes(Posted 2005) [#1]
Why not just dump the Field keyword and use Local? Just seems like a bit of a discrepency to me =]


Dubious Drewski(Posted 2005) [#2]
Ah! Wait. So you're telling me there really is no difference
between Local and Field inside of a type?


taxlerendiosk(Posted 2005) [#3]
drew: You can't define Locals in a type. What he's saying is that the term "Field" (which is a carryover from the old Blitz3D/+/etc. types) is inconsistent with "Global".


Bot Builder(Posted 2005) [#4]
Dunno if its that much of a discrepency - in .NET variables as members of classes are called fields. Although, actual usage of public fields is discouraged in favor of public wrapper properties.


WendellM(Posted 2005) [#5]
Maybe use of "Local" within a Type is reserved for future use as a "private Field" <hope>


N(Posted 2005) [#6]
Could call it 'member' and have prefixes such as 'private', 'public', 'protected', etc.

e.g.,
Private Member Dong%



Hotcakes(Posted 2005) [#7]
Noel, why would anyone donate for your software now, when all there is left is your blog and artwork? ;]

Wendell, that's a great hope. I share your hope. That hope gets me all warm and jibbly on the inside.


Leiden(Posted 2005) [#8]
He needs money for a cosmetic operation ;)


Robert(Posted 2005) [#9]
Maybe use of "Local" within a Type is reserved for future use as a "private Field" <hope>


In which case I think just using "private field" would be better instead.

Fields and locals have different scopes. Fields are accessible from any method within the type, as well as outside the type by using dot-notation (object.field) - although I would welcome the ability to have protected or private fields.