Code Density and readability problems

[quote=65049:@Joshua Woods]So far no one has been able to tell me exactly why these operators are a bad idea and reduce readability.
[/quote]

There is a large (likely dominat) novice and non-professional coder contingent who use Xojo the language because it is approachable. This is Xojo the company’s market. With a product like Xojo the product, selling what your market wants is often more important than selling the best thing possible, however we decide to evaluate “best”. So sure Joshua, wonderful idea. As a language enthusiast, I say “good try, good effort” but knowing what I know about this market, I say “not here”.

Amando, I’m not going to restate all my points. Please go back and read all of my posts as they paint the big picture.

And if you use that syntax, then I have to use the syntax when you share code with me. (“You” being the royal “you”.) We are not coding in a vacuum here, which is why we all participate on this forum.

I think Brad hit the nail on the head. To some extent the observation about being “toy-like” is true. It just happens to be a very versatile toy. :wink:

[quote=65064:@Kem Tekinay]Amando, I’m not going to restate all my points. Please go back and read all of my posts as they paint the big picture.

And if you use that syntax, then I have to use the syntax when you share code with me. (“You” being the royal “you”.) We are not coding in a vacuum here, which is why we all participate on this forum.[/quote]

For my own use, without sharing code I would prefer to use my way, while for sharing code I would use a verbose mode. I still see code that is advanced (Delegates, Introspection, etc) not approachable for all. But I understand your point of view in this case of sharing code and establishing a syntax mode that is easy for new users would be difficult.

Well, I somehow feel the same using English in the forum as a non native Speaker… Let’s speak Esperanto :slight_smile:

Esperanto?!? Why don’t you come to your senses?

:stuck_out_tongue:

[quote]Joshua Woods So far no one has been able to tell me exactly why these operators are a bad idea and reduce readability.[/quote]Well, nobody has to. You want a change, so you have to deliver arguments - and good ones if possible. Just stating that you don’t like the verbosity of i = i + 1 is not an argument.

By the way: if you really want the shortness of C/C++, why not change to Qt?

Actually EVERYONE has given perfect reasons why these operators reduce readabiltiy.

“personal preference”… end of statement.

Syntax is what syntax is… meaning what you “grew up on” makes the most sense and/or is most comfortable. I don’t think anyone said “DON’T ADD THIS”… They (myself included) has indicated that it would be of little benefit to THEM.

You have stated your opinion… you like that syntax… you wish it were part of Xojo
Others have stated they don’t like that syntax, and (for the most part) don’t care if it is or is not part of XOJO

Now… we have all stated our opinions… some of us agree with others, some of us don’t… but that is the beauty of an opinion, everyone gets to have one… and they can be uniquely yours.

But at the end of the day it boils down to this.

XOJO does not currently support that syntax.
If/When it ever does is up to the Management and Design Engineers at Xojo (swayed or not by our opinions)

So… if you feel strongly enough… submit a feedback report and get it voted up…

been round this one a few times

<https://xojo.com/issue/16862>
<https://xojo.com/issue/17418>
<https://xojo.com/issue/17643>

And unnumbered other conversations, and thousands more will come, until the inevitable evolution.

That’s why I gave my arguments, gone away and returned here now just to see the expected resulting battle finishing with the usual “NO”.

That’s life. Let’s repeat this thread in the next semester… Again. :slight_smile:

While I don’t agree it was easier to understand (quite the opposite really), the main point is that the time it takes to write a line of code is immaterial in the larger scheme of things.

[quote=65121:@Rick Araujo]That’s life. Let’s repeat this thread in the next semester… Again. :slight_smile:
[/quote]

Or you could always just accept the consensus that has emerged. Back when my knees functioned and I could run the floor and play hoops with the big kids, there would invariably be some new guy who got a little loose with the elbows. First, we’d ask nicely. Then, if needed, someone might get body checked to the ground. Loose elbows never gained much acceptance.

The consensus about what people outside this forum wants, is outside this forum, Brad. And this consensus will be beating at the door all the time, as always, liking it or not. And every time I feel they are right, and I wish to express that, I will. :slight_smile:

The consensus about what the entire user base wants is not measurable by either you or me, Rick. So I use the knowledge I have about Geoff and his crew to arrive at the conclusion that they have their finger on the pulse, mean what they say, and balance language issues like this pretty well over time. But put that discussion of who gets to run their company aside for a moment…

If your issue is code density, you can solve it readily and easily with a very simple global method:

Public Sub INC(ByRef x as integer, delta as integer = 1) x = x + delta End Sub

I will go out on a limb and guess that this won’t be good enough to satisfy the stated objective, because I know how you people think, i.e. without regard to costs, benefits, or balancing them. But there’s your simple solution to the stated problem :-).

I have been very impressed with the design decisions that have gone into the language. Xojo has been careful with what they change and why. They seem to be playing to their niche quite well. Good job, Geoff!

We try.
There’s always pressure to make things simpler or make things more professional (aka the start of this entire thread)
And coming to some balancing point between those is a very difficult and often thankless job.

I’m sure everyone has things they can point at and say “this doesn’t extend far enough for professional users” (listbox anyone?) and then there are things that are far to complex for new users.

In fact many of these same discussions take place among the engineers with respect to iOS & the new framework as we are trying to take that opportunity to reexamine everything - frameworks, language, how we build stuff in, what we build in and then toss in all the gotcha’s, tricks and traps that people stumble over.

And still ship a product on a schedule :stuck_out_tongue:

That makes the process a lot longer & harder than just porting everything we have today.
But it also gives us an excellent opportunity to fix some design decisions that were made long ago that no longer apply or that needed revisiting for whatever reason.
Its one reason that iOS hasn’t rolled out the door yet - there’s a huge investment of time & effort to make sure things are right and we have APIs we can live with for a long time.
We can always fix bugs in implementations.
But changing an API is VERY difficult as people rely on them over time.

And remember that Steve Jobs once said he was as proud of the things they left out of products as he was the things that were in them (http://www.forbes.com/sites/carminegallo/2011/05/16/steve-jobs-get-rid-of-the-crappy-stuff/)
Its not an easy job

Well I won’t say too much more because it’s futile, but thanks again to everyone for sharing what you think of things. It certainly was entertaining. I’ll finish up by saying a few things and then I’ll leave it at that.

[quote=65051:@Kem Tekinay]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.[/quote]

You see, for me points 1 and 2 are the reverse. They increase readability, and they make it easier to debug. I’ve already explained why, and you haven’t. You are refusing to. Points alone without any explanation or reasoning behind them fall flat, which means that you have absolutely no argument.

My problem now is that you would feel so strongly about something that you would try to stop other people from getting this thing that they want even when you can’t properly explain why they shouldn’t have it. If you can’t explain exactly why and give good reasons as to why you would want to stop other people from having something, I think it’s quite ok for those people to demand for some reasoning.

As for “because I do.” - there are quite a few problems with this. See what I’ve written below in response to Eli. Coming from an intelligent man like yourself I’m honestly a little surprised by this type of response.

@Dave S people have given reasons but not gone into detail about why. They simply say it reduces readability. Or that they don’t like it. Or that it’s not historical. I counter that argument with why I think it increases readability, and they simply restate that it doesn’t without ever saying why.

@Eli Ott I don’t want to change languages. I like using Xojo. I think some people take far too quickly to the “Don’t like it, get up and leave. Find another language.” type of stance… and that isn’t healthy for Xojo. Too much of that and it’ll end up like some of the Linux community if it’s not careful: a small community of very insular people with a strong ideology defending it against all outside experience and influence. It’s a stance of: “We’re right, you’re wrong. I don’t have to explain anything to you. If you don’t like it, tough.” This is an attitude without compromise or consideration and it turns people away. All the while these people will be slapping each other on the back saying “Good job! We showed that guy!” and then wonder and complain about why there’s no one else around.

If Xojo is to grow and attract all sorts of people, then it needs to be open to a little bit of criticism. Its users need to be open to people with ideas different to their own. If it decides to not to include features that many people think are important, then it needs to properly explain why and provide solid reasons for it. Thus far the reasons haven’t really been solid, in my opinion. Especially the beginners reason which seems to be the official line from Mr. Perlman. That just doesn’t float at all. I already said why in the first post. If I saw a good reason that I could agree with, I’d probably just accept the decision. But accepting something without an explanation just because you tell me to? You’ll have more luck squeezing blood from a stone.

Here’s just another short little example I’m going to throw in here:

it is, we are, they are, etc
it's, we're, they're, etc

You only have to learn what it's means once. Forever more, it’s easier to say. Are you going to cut that out of the English language to help beginners? I surely hope not. I’d be as tired of saying “we are” as I am of writing “i = i + 1” and there’s no loss of clarity.

And another example. With the += operator you only have to consider two things: the values on either side of the operator. I know immediately that whatever is on the right is added to the left. One thought, if you will. With the long form, I have to first calculate the right and then add it to the left. Much more error prone because it’s an operation involving two operators instead of just one. I also have to determine if it is even an increment or some other kind of operation.

Funny how dogmatism renders one blind :\

[quote=65254:@Joshua Woods]
You see, for me points 1 and 2 are the reverse. They increase readability, and they make it easier to debug. I’ve already explained why, and you haven’t. You are refusing to.[/quote]

It’s self evident that i++ is much more cryptic than i = i + 1. What i = i + 1 does in more obvious to more people… and having lines with dense compact operators tends to make things less readable to most people. It is less initiatively readable… The only reason some think it is more readable is training and heavy usage of c type languages which have their origin closer to the hardware.

That said, for some people syntax like that NEVER becomes more easy to read than the more verbose form. And that has nothing to with understanding concepts.

I agree my mind also fogs over with large blocks of text… but that is what whitespace and formatting is for.

Can’t edit…

“initiatively readable” was supposed to be , “intuitively readable”

Seems it is time to add one more to the list of things never to argue about…

  1. Politics
  2. Religion
  3. Programming Language Syntax

I counter that everyone said why… in one form or another. “I do not like it…” is a perfectly acceptable rationale.

I don’t know where you learned English … but when I was a child, I was taught to speak proper English…
as in “it is, we are, they are etc.”. That along with the rest of the spoken language devolved over time.
But that was not how I was originally taught, and I hope that is not how children today are taught.