Aah, I'm not alone in thinking BASIC is great

One of the top reasons I use Xojo for iOS/Mac development is that I can use a BASIC(-like) language. I’m not exaggerating if I say that I tried 5-6 times to give Swift another chance, because, let’s face it, if you only develop for iOS/Mac then why do you need Xojo?

Swift, for me, is too much C, like the answers in this question confirm:

https://www.quora.com/Swift-is-obviously-influenced-by-C-++-They-could-have-made-it-so-much-simpler-if-they-looked-at-languages-like-BASIC-and-Python-Why-didnt-they

I hate C and every language that has about the same (concise) syntax. Below I’ve put an (old) post which resembles my feelings:

https://joshmouch.wordpress.com/2007/02/16/syntax-5-vbnet/

Especially the comment of Ken.

I’ve read many times that Swift is as easy as BASIC. That’s why I kept trying to like Swift. I failed. I raise my white flag. I just keep using BASIC-like languages. I don’t see that as a defeat ;).

Swift has no more reason to become Basic than Xojo has to become C. Or German to adopt French syntax. Each has its origins, culture, and as a result, ways to do things that may feel literally alien to the other.

I have often voiced my opposition to making Xojo C-like, as IMHO the main advantage of Xojo is its discursive, descriptive (some would say verbose) and somewhat literary quality. For instance, I find A = A + 1 much more explicit than A++.

Swift is definitely not Basic, it is the son of C in many ways, but has dropped antiquated semicolon and other stuffy syntaxic avatars that made Objective-C a paragon of a abstrusity. Maybe Swift is to OC what modern Italian is to Latin. I could never stomach Objective-C, but I find Swift much closer to JavaScript, which I use rather easily.

What remains a bit painful has nothing to do with Swift in itself. It is the paradox of choice incarnate of XCode. When a simple control has a list of thirty of so properties, it is not unlike having to pick a salad seasoning amongst the same number of sauces. Add to that the highly obfuscated Apple Programmer’s Library and its vague descriptions, and it becomes very challenging. But hey, anybody who attempted to tap into the framework with declares suffered the same plight.

I rather go Xojo too.

apple is able to make very simple and very efficient piece of software.
xcode is the exception …
may be it is to discourage developpers to use it ?
I cannot stand C, and more objC syntax is soooo complicated.
I did not try swift but wanted to take a look at it as I read it was simplier than ObjC
may be but still not simple enought for me to use it ?
the only big thing that I miss in xojo is the ability to program my IDE environment like we could do in Prograph
but it was in the last century… :wink:
if we could have better control of the property inspector ( not only string and checkboxes… but results of methods?)

Michel, interesting how opinions differ:
I love Objective C. It is clean, it’s concept is easy to understand, the code is very readable. It is my favorite programming language. In addition Cocoa is an easily understandable and very concise framework. And the Apple developer library is great (once you understand Cocoa and Objective C).

Personally I think Swift is as easy as Basic. Syntax is kept simple and readable. It has not a steep learn curve at all.
That said, the Interface Builder that comes along to create OSX and iOS apps is pretty darn difficult and confusing to say the least. I struggle with that part a lot.
Maybe thats what you dislike too?

[quote=249149:@Christoph De Vocht]Personally I think Swift is as easy as Basic. Syntax is kept simple and readable. It has not a steep learn curve at all.
That said, the Interface Builder that comes along to create OSX and iOS apps is pretty darn difficult and confusing to say the least. I struggle with that part a lot.
Maybe thats what you dislike too?[/quote]

Well, as long as the code is small, like in tutorials, it looks ok. But when using real-world (=long) code then it really becomes confusing.

Eg. the use of brackets. It’s not Swift, but look at the bracket mess in this code example:

https://msdn.microsoft.com/en-us/library/hh454950.aspx?f=255&MSPPError=-2147217396

Very hard to see which end bracket belongs to which start bracket.

The comment from Ken (see first link) is almost exactly what I mean with why I prefer BASIC. Very good read.

[quote=249143:@Eli Ott]Michel, interesting how opinions differ:
I love Objective C. It is clean, it’s concept is easy to understand, the code is very readable. It is my favorite programming language. In addition Cocoa is an easily understandable and very concise framework. And the Apple developer library is great (once you understand Cocoa and Objective C).[/quote]

I believe programming languages are tied to a culture much more than we may think. First of all, for most people like me who started with micro computers back in the early eighties, first language was Basic. That tends to create a relationship to abstraction around the structure of Basic. Most people who had the chance to learn computer science at school, meaning from the 90s on, have been exposed first to C. That certainly plays a role in the feeling of comfort.

Then, and I maybe venturing in pure hypothesis, I loved Basic from the start go because it is in fact almost natural english. Then being French, that language is rather descriptive, discursive, kind of verbose, and that is very much the case of Basic. In German, you have the concept of contractions, where an entire phrase can be stacked together to form a words that encompasses noun and verb. I would dare saying that it is very C-like. Would it not be possible that it be easier for someone who’s human syntax already has compact structures, to use a computer language using the same kind of metaphor ?

Note that I did not pretend to say in the absolute, what is best. I just voiced my personal preference. Beyond culture, it is the privilege of any programmer to choose what suits him best.

While this topic exists…

I love XOJO, have used it for many years, and contribute often to this forum.

That being said. XOJO for iOS is anemic (and in my opinion that is being overly kind)

SWIFT should not be confused with or compared with ObjC. They share many of the same roots (as they were developed in the same corporate envirnoment)… But the learning curve IS NOT bad… it is different.

I have taught my self SWIFT since it was first released, and have written a dozen apps of vary complexity, a few games that are in the App Store, a very complex personal database program (an iOS version of an XOJO app I wrote a while back), and also have in works a number of other apps that I don’t wish to reveal quite yet.

That can be a PRO or CON …

  • PRO - gives the user whatever level of control they want
  • CON - gives the user too much control over what they need

Note : Almost every iOS control (of which XOJO is missing many) have adequate default values for that myriad of properties, meaning you only need to address those you wish/need to change. XOJO (iOS or Desktop) is EXACTLY the same in this respect, its just the LEVEL of control varies.

I will admit the one thing I hate about iOS programming (and this is NOT a SWIFT or XOJO issue)… AUTOLAYOUT
but it is 100% possible to create complex applications without ever using it… At least in SWIFT it is

The issue isn’t that Swift is hard to learn. I know Swift. It’s the syntax that I dislike very much. Too much C influences, like mentioned in the Quora link. For me C-like languages are a mess syntax-wise (like described in the second link in my OP). With this said it’s maybe obvious why I like the Python language also. Easy on the eyes.

For the same reason I use VB.NET instead of C#. I really tried to like C# and/or get comfortable with it. Career-wise that would be better. But I just hate C#.

Yes, it’s a very personal taste. There’s never a “best language”. No language war needed ;).

For me it was Pascal, which was very widespread at universities at that time (and early version of Modula and then Oberon).

I always believed – and I still do – (maybe because I was taught that way) that the term programming languages is wrong and that programming languages are not languages but rather a kind of a programming formalism (I don’t know the proper English term for it). Take HyperCard / AppleScript which is very readable but the code is not easily understood – you have to re-re-re-read a statement until you find the “formal depiction” of it in your head.

I also assume that RB initially was influenced by Java and therefore indirectly by Objective C (the first version of RB compiled for the JVM).

With the exception of C itself (and Objective C). C is very readable and concise. It is actually a very small language. C# is complex, but it can be managed. I don’t like it. What I really despise is C++.

Actually, Hypercard/Livecode/Smalltalk/AppleScript went too far in trying to be natural English. As a result it has become mumbo-jumbo. Or should I say computer pidgin English.

Computer languages are nevertheless vehicular methods used to organize programs, if they are not interactive languages. Sure, they are just a set of instructions, but lIke human languages, they have a syntax, if more formal than human ones, and different philosophies behind their structure.

Compared to machine language, even Assembler has a higher level of abstraction, verbs and complements, even articles, that constitute a language. Any language being a formalism and an abstract representation of reality.

I believe there lies what makes them enjoyable or not, even repulsive, depending on each upbringing in computer science.

Amazing when you say you like Objective-C and find C# complex. It feels just the opposite to me. In many ways, computing is a matter of personal taste as much as engineering.

That would be the origin of the strong type…

Objective C is a very, very small language. It adds only a few concepts to the already small language C. Albeit Hillegass wrote the following just after Swift was released, it is still valid:

[quote]Objective-C is easier to learn than Swift
C is a really simple little language, and Objective-C is a really simple little extension to C. Swift has many rules that Objective-C does not. (I, as an instructor, am already trying to figure out how I will explain the rules around optional variables and the proper use of ? and ! to signal the programmer’s intent around optionality.) These extra rules mean that the compiler can be much more pedantic about enforcing good coding practices, but it also means that the language will take longer to learn.

Objective-C requires programmers to be explicit. The Swift language lets the compiler do more work for the programmer. This is great—less typing for the programmer, right?—but it means that when you look at a line of code, it won’t mean much without a deep understanding of the context in which that line lives. Explicit languages are easier for beginners to understand.

Swift has a bunch of constructs that Objective-C doesn’t have. For example, generics make type checking better in Swift, but it makes that language considerably more complex.
[/quote]
iOS Developers Need to Know Objective-C

You misunderstand. I am not saying Objective-C is complex. I am saying I do not like its syntax.

I am allergic to its notation probably more than semicolons and braces which I use daily with JavaScript.

That does not make it a bad language more than me saying I am allergic to strawberries makes them a bad fruit.

I do agree with Hillegass on one point : Objective-C forces the programmer to do things a computer should carry out, and that is the reason why I prefer Swift. It is called a better UI, in my book.

Yes, in that case I probably did and do.

But I do not think that personal preference is important. A programming language can be learned even if one does not like it. Roughly then years ago I had to drastically ameliorate my C++ knowledge for a two year project in short time. I mastered what was demanded from me. And I still can read C++ code and understand it (and write Xojo plugins in it), but I despise C++ because it is measurably more complex than other languages. It is exactly why Hillegass says Objective C is easier to learn than Swift. And much easier to read. And I think that is the important part. Or functional programming languages would have conquered the world by now.

The chance of creating unreadable “Spagetti Code” does not correlate with the language? Even in XOJO I can try to write down everything in one line… in a C syntax style… it’s a matter of personal preference and programming style or available time IfYouNeedToHackEverythingDownBecauseOfSillyDeadlinesWithoutTheNeedToDealWithItLaterBecauseThereIsNoSupportClauseInTheContract

:slight_smile:

This would be more related to application architecture, algorithms and the like.

Programming languages and its syntaxes, semantics, type systems, etc. differ enormously. Some are based on just a few simple concepts, some are overloaded with too many concepts which in addition then also are often very complex ones.

And I think it is the latter which makes reading C++ code so difficult (which you do much more often than to write code). It is kind of a “dereferencing” which your brain needs to make with complex C++ code. You look at a few lines of code and you have to translate it into simple steps to understand it. This is not the case for example in Xojo or Objective C.

[quote=249259:@Eli Ott]Some are based on just a few simple concepts, some are overloaded with too many concepts which in addition then also are often very complex ones.
And I think it is the latter which makes reading C++ code so difficult [/quote]

But yes, personal preferences are important. Each of us is somewhat hard wired to give his best in a given context, and we all know a human being usually delivers his best achievements when he enjoys what he does.

Granted, a good programmer can use pretty much anything, given a little effort. But that would be forgetting that the drive that creates the best programs is based on the amount of pleasure it gives to its creator.

This link, among others, provides an interesting view on the topic of understanding programming code.

I will quote a part:

[quote]The team found a clear, distinct activation pattern of five brain regions, which are related to language processing, working memory, and attention. The programmers in the study recruited parts of the brain typically associated with language processing and verbal oriented processing (ventral lateral prefrontal cortex). At least for the simple code snippets presented, programmers could use existing language regions of the brain to understand code without requiring more complex mental models to be constructed and manipulated.

Interestingly, even though there was code that involve mathematical operations, conditionals, and loop iteration, for these particular tasks, programming had less in common with mathematics and more in common with language. Mathematical calculations typically take place in the intraparietal sulcus, mathematical reasoning in the right frontal pole, and logical reasoning in the left frontal pole. These areas were not strongly activated in comprehending source code.[/quote]

I would infer that individuals who are particularly adept at learning languages will learn programming languages easier too. I wonder if this hypothesis verifies in real life.

It would make sense that the neural pathways used to grasp the syntax of a foreign language as well as its concepts be used to grasp abstractions and syntax in a computer language. Years ago I discovered that Japanese counted objects in function of their shape or nature. That is an entirely alien concept for a European, not found in French, Spanish or English I am fortunate enough to understand. In a sense, that strong type in a human language finds a parallel in the Xojo strong typed language.