why did we change the vernacular?

I was talking to a friend today who is still firmly glued and bolted to VB. When he asked me to cite reasons for changing to Xojo, he got upset when I referred to the following differently to what he was used to i.e.:
variable = property
sub =method
function()=method() just to name a few. As trivial as it may be, my question is; why did we change the names of very traditional programming parts. It smacks of the alternative socialist government in Australia who sees being PC and finding alternative names for everything as justification for their existence. About 15 years ago they even tried to stop plumbers from using the term ‘ballcock’ because it was deemed as sexist.

OOP.

How does that explain things? does not compute!

I’m not sure what you mean. Xojo uses variables, properties, subs, functions and methods. What exactly changed? That said, VB is in no way the “standard”.

Technically a method is a “function” of an object, while a function is a callable piece of code that stands on its own. You could argue that methods inside modules should rather be called functions, but then again, a module itself can be seen as an object, and therefore the functions should be called methods.

I would stop being his friend…

Classic Visual Basic was not an OOP language. MS called it object-based. So in the end with a few exceptions it was a procedural programming language.

Usually the naming for procedural programming languages was: variables and procedures.

C++ and other OOP languages at that time used a different naming: procedures on objects were called methods, and variables on objects were called fields or properties.

On could argue that Xojo (or RB at that time) should have named variables and procedures in modules variables and procedures (module being a namespace only). On the other side modules can be viewed as singletons (sole instances of a class).

I would never de-friend a person because they used VB even though it sounds like some kind of disease of the lower regions.

It has nothing to do with his language choice…

[quote=193729:@chris benton]variable = property
sub =method
function()=method() just to name a few. As trivial as it may be, my question is; why did we change the names of very traditional programming parts.[/quote]

Not really a change. In VB controls, modules and classes have properties which happen to be variables (or classes), and you may create new ones as well. Within events or programming structures (sub, functions), the common name is variables. In Xojo it is exactly the same.

If you look up the IDE, a method that returns a value is declared as Function, a method that does not return a value is declared as a sub. Actually the language itself never says method anywhere. We simply generically call them methods, so do the menus in the IDE. They could have used “Add a Function” and “Add a Sub” instead. You could call them procedures if you liked, that would not change a bit how the language itself works.

In fact both Xojo and VB languages have strong lexical similarities. Where it starts to differ is the philosophy of the language. VB is still very much a procedural language inherited from GWBasic/QuickBasic that caught OOP aspects, whereas Xojo has been OOP and event driven from the start go.

In truth I feel VB to be kind of a remote cousin more than something entirely different. A bit like Xojo with a strong accent :wink:

Like programming for grown-ups you could say

[quote=193729:@chris benton]variable = property
sub =method
function()=method() [/quote]
You explained it wrongly :stuck_out_tongue_winking_eye:

A property can be a variable but it is not the same, it is a superset.
There are two types of sub routines, methods and functions.
Function is not the same as method. A function (like sin(x) ) returns a value, a method (like beep) does not.

I would never consider using VB6 anymore, since that was just not programming but putting keywords one after another. And for modern development within the .NET framework, only C# would be a serious option, as long as you like MS.
Above all, XOJO offers much more and is THE multiplatform, OO and RAD environment.
Just one little thing… eh … it took me some time to accept the IDE … but even that became second nature… :slight_smile:

A variable is an identifier for accessing a memory location.
A property is a variable on a class instance (in Xojo also used for class variables and in modules).

[quote=193792:@Markus Winter]There are two types of sub routines, methods and functions.
Function is not the same as method. A function (like sin(x) ) returns a value, a method (like beep) does not.[/quote]
Wrong. There are two types of procedures: Sub and Function.
Method is usually used for procedures on class instances (and in Xojo also for class procedures).

In know that I digress from my original request for opinions, but I think that the change to a new look and feel IDE makes us more resistant to jumping from one language to another. I remember when I went from VB to Delphi. It wasn’t so much their version of Pascal that I found confronting, but the new visual IDE, so many buttons, so many choices.

@Joost Rongen wrote: [quote]I would never consider using VB6 anymore, since that was just not programming but putting keywords one after another. [/quote]

I believe that there is ample room for disagreement here. If I recall correctly, the original Visio, by Shapeware (before MS purchased it), was written at least in part in VB (circa 1992). And it was a real application done with real programming. There are numerous examples of sophisticated corporate applications written in VB. VB was very accessible and affordable, so it also allowed anyone to write code. Yes a lot of bad code was also written in VB.

I am of the opinion that one should not confuse sloppy programming done with a language and the language itself.

[quote=193805:@Louis Desjardins]@Joost Rongen wrote:
I am of the opinion that one should not confuse sloppy programming done with a language and the language itself.[/quote]

indeed, any language, human or otherwise, is as good as the talent of the locutor. Sure, there are languages more or less appropriate for certain kinds of uses, but overall, the limits are set by the mental barriers of the user. Basic in general, would that be the original interpreted Dartmouth, Applesoft Basic or IBM-PC Basica, has produced amazing programs, such as Visicalc, the first ever spreadsheet. There are countless excellent applications in VB. We all know there are remarkable programs in real Basic/Xojo.

Let us not verse into the kind of language snobism we all too often endure from lesson givers who says that serious apps can only be written in C, Java, whatever…

Terrible programming can be achieved in any computer language.

[quote=193850:@Michel Bujardet]Let us not verse into the kind of language snobism we all too often endure from lesson givers who says that serious apps can only be written in C, Java, whatever…

Terrible programming can be achieved in any computer language.[/quote]
There was a whole thread on this forum dedicated to the use of the GOTO command in which most argued that it should be avoided mainly for style and skill reasons. While I wouldn’t necessarily class the naysayers of GOTO as snobs, they are arguing against the edict of ‘whatever works’. Would you prefer your code to break sans GOTO or work well with some archaic commands included?
I was glad to see things like Let a=b disappear, but I would still consider GOTO a ‘break in case of emergency’ command.

The truth that no one can contradict.

[quote=193961:@chris benton]There was a whole thread on this forum dedicated to the use of the GOTO command in which most argued that it should be avoided mainly for style and skill reasons. While I wouldn’t necessarily class the naysayers of GOTO as snobs, they are arguing against the edict of ‘whatever works’. Would you prefer your code to break sans GOTO or work well with some archaic commands included?
I was glad to see things like Let a=b disappear, but I would still consider GOTO a ‘break in case of emergency’ command.[/quote]

I am squarely on the pragmatic side, which means ‘whatever works for you’, but I am also convinced that writing elegant code is the way to insure stability and reusability.

I have no idea why Xojo still contains Goto, but it is here. I cannot really see what I would ever do with it, but there may come a day when it will present as the best available possibility. Mental barriers, would that be against Goto, are of the same nature of what prompted Galileo’s prosecution. They should have no place in programming, IMHO.

Is it not curious that ever since I started using VB back in the nineties, and throughout all these RB/Xojo years, I never needed Goto ?