Code Density and readability problems

@Kimball Larsen you are spot on. I recently tried to show Xojo to a friend of mine. He’s a brilliant programmer who is very mathematical and whenever I have problems I go straight to him and he knows the answer. He exhales machine code and speaks in OpenGL.

On a whole he liked it, but he found the whole operator thing that I just described here to be a major turn off. Of course it would be, to someone like him. It is a limiting factor of the language. His first question was “What’s this i = i + 1 business? Have you forgotten how to program?” and then I had to explain the problem to him.

By taking away the all the shortcuts you can create longer and more convoluted paths to achieve the same goal. Sometimes these paths aren’t necessarily easier. Speaking for myself, when I was learning Xojo for the first time and I found I couldn’t do a simple increment it was an immediate turn off. Luckily the rest of Xojo shines so brightly it almost doesn’t matter… almost.

Heya Norm - I’ve actually had people tell me that Xojo IS too “toy-like” specifically because they can’t do ++ or +=. (among other things, like a better debugger (watchpoints, anyone?), more customizable code editor (ever tried changing the code font? The editor is unusable if I do - or how about the background color of the editor?) Their attitude is that it feels like a tool to be used in an educational environment to teach the basics of programming, but once you get your big-boy pants on and get out into the real world you’ll use a grown-up language like Java, Objective-C, C++, C#, PHP, PERL, etc in a real IDE like NetBeans, Aptana, XCode, etc.

I happen to disagree with this sentiment, and I love Xojo and find it to be a very important part of my professional development toolchain. I’m just relaying the impression that experienced newcomers get from it - that it is missing major defacto creature comforts of nearly every mainstream environment - starting with ++.

I have had absolutely the same experience when I showed Xojo to some people and the answer was exactly the same. I tried to explain that the compiler did not accept the increments operator and the answer was a simply “And why not?”.

Xojo in my opinion is a mature language of more than 10 years and adding these operators doesn’t make it less entry level language for OOP, but more mature. And Java has ++ too :wink:

But VB does not. The Xojo language is statement-based like VB and not expression-based, like C or Java. I believe VB has +=, but that is different than ++.

[quote=65003:@Kimball Larsen]Heya Norm - I’ve actually had people tell me that Xojo IS too “toy-like” specifically because they can’t do ++ or +=. (among other things, like a better debugger (watchpoints, anyone?), more customizable code editor (ever tried changing the code font? The editor is unusable if I do - or how about the background color of the editor?) Their attitude is that it feels like a tool to be used in an educational environment to teach the basics of programming, but once you get your big-boy pants on and get out into the real world you’ll use a grown-up language like Java, Objective-C, C++, C#, PHP, PERL, etc in a real IDE like NetBeans, Aptana, XCode, etc.

I happen to disagree with this sentiment, and I love Xojo and find it to be a very important part of my professional development toolchain. I’m just relaying the impression that experienced newcomers get from it - that it is missing major defacto creature comforts of nearly every mainstream environment - starting with ++.[/quote]

Language snobbery exists on all levels
Assembler programmers mostly look at everyone else & say “wimps”
Been there done that used to BE one of those guys & if you could’t code in Vax assembler or mess with every bit of the registers in an Alpha because you use some kiddy language like C (yes seriously) then it wasn’t worth the time of day to talk to those guys.
Cobol - HA …. how could you ever use that for anything serious ?
PL/1 - bah …

If the only criticism is “theres no += or ++” then they really have not looked at it in any serious way and reject it “because it doesn’t look like what I already know”. That’s intellectually lazy - they’ll never look at any other languages that could be hugely useful or instructive.

There ARE lots of things to miss but ++ and += are seriously NOT that big a deal
Many compilers will take

i=i+1 

and

i++

and compile down to the same machine code
++ semantics in C are what most people expect when you use ++ and they don’t have any place in Xojo
Thats why I doubt they’d ever show up - the language & runtimes just aren’t C or any of the derivatives so while

  i++ ;

and

++i

on a single line don’t make much difference (minor exceptions may apply) in usage they make an enormous difference if you do something like

while i++ vs

   while ++i

THOSE semantics don’t make sense in Xojo

Substituting

i += 10 for

i = i + 10
is a very low priority

Making classes first class objects and a host of other items in the language would have way more utility
Making the framework thread safe would be a big deal

Those are much bigger changes - but all we’re discussing here is ++ and +=

Hi Paul. I was referring to Norman about: :wink:

language design philosophy in terms of interfaces, mixins, no multiple inheritance

dont mistake that for “we copied the syntax” a we obviously didn’t

My personal opinion is that I lose a bit of respect for anyone who judges a language on whether they can do i++ or not.

And my opinion is that in order to attract more devs in the mainstream we need to provide more creature comforts to provide a less jarring transition. The whole debate over ++ operators is merely a tiny example of a much larger set of symptoms: Coming from XCode, Aptana, Visual Studio, NetBeans, et al both the IDE and language of Xojo feels relatively stripped down and “toy-like”.

Again, I love Xojo and use it every day to build awesome stuff. But for the other devs I’ve shown it to / attempted to evangelize, they have found numerous nitpicks that they feel are important to their workflows and are missing in Xojo.

Attracting the mainstream means becoming more mainstream. I hope Xojo is able to do this, but after 10+ years of using it, I’ve resigned myself to knowing it’s not likely to ever happen. So I don’t tell many other developers about it anymore, because they perceive it as a toy, and the fact I use it and evangelize it leads them to certain conclusions about my particular skillset. I want to be seen as a professional, and wish I felt Xojo did to.

While you’re at it, please require a “;” to separate statements so we can type all our code on one line. And allow braces for loops. That way, we too could share code that looks like:

while i<1{DoStuff(x++);y/=i++;};

How great would life be then?

[quote=65032:@Kem Tekinay]While you’re at it, please require a “;” to separate statements so we can type all our code on one line. And allow braces for loops. That way, we too could share code that looks like:

while i<1{DoStuff(x++);y/=i++;};

How great would life be then?[/quote]
I never requested that, Kem. Let’s not be overly emotional here.

Tell me exactly why not having these operators is good. Why do they threaten you so much, when they just make a statement more readable? I really want to know, because I can’t understand it.

If they make a statement more readable is up for debate (in my opinion).
If they were there and their use was optional… so be it…
But Xojo has much higher priority items on their plate…

plus remember that XOJO has its syntax roots in BASIC… not in C

[quote=65035:@Dave S]If they make a statement more readable is up for debate (in my opinion).
[/quote]

We disagree. That syntax clearly makes the code less readable.

And Joshua, why would you think I’m “threatened”? If the operators were there, I’d use them, just as I use them if I have to write perl, PHP, or C code. What you can’t seem to understand is someone who is comfortable using them, yet still doesn’t like them. That’s me. In terms of ease of coding, they make life easier. In terms of readability and tracking down bugs, they make them harder. I prefer readability.

And if they introduce them, the other parts of my sarcastic post will not be far behind. Why? Because some “professional” programmer somewhere thinks Xojo is a toy without them, naturally.

Kem… that is exactly what I said…

Meaning… my opinion is that syntax makes things LESS readable.

I agree with your stance 100%

I still can’t figure out what i+=1 means. Is it if you increase i it becomes 1 so i must be zero? :wink:

In some circles, this would be called “self hatred”.

I hate that I love using them? Well, screw me then.

@Dave S Roots are not important. It doesn’t matter where something comes from, so long as it’s useful.

@Kem Tekinay I think you are threatened because you made sarcastic reply blowing everything out of proportion, well beyond what I proposed, instead of providing a proper counter argument. It’s like me saying “Oh I want some Chinese food tonight” and then you saying “Oh and what’s next? bringing the whole country in too? Now we’ll be eating with chop sticks instead of forks! Then you’ll want to build the great wall in the garden!” and I reply “Well, no Kem. We’d still eat the fried rice with a fork.” Why don’t you like the operators? Can you make a list of why they’re bad for you, so I can understand?

So far no one has been able to tell me exactly why these operators are a bad idea and reduce readability.

@Dave S, can you please explain exactly why it is up for debate? What don’t you like about them?

I already stated my three main objections, but let me list them again here:

  1. They reduce readability.
  2. They make it harder to debug. (See point 1.)
  3. They open the door for more operators that will take the language in the wrong direction.

If you want me to explain why I find them less readable, I’m afraid you’ll have to settle for, “because I do.”

BTW, my sarcastic post was meant to illustrate through absurdity. Your analogy is faulty.

Kem, if you feel using these operator reduces readability, are harder to debug, etc… Don’t use them if these were finally introduced in Xojo: You can still use the verbose mode. I am not affected personally by any of the points you write, so leave me with the possibility of using them and feeling confortable as well.

Some of us are requesting this for lot of time and I see why we can’t make use of a feature we request, obviously because we feel more confortable using them.