Xojo for Javascript/Typescript

Xojo should be improved and modernize to provide today’s and tomorrow coding challenges.

I’m talking from personal experience and from experience of someone who started with Xojo.

I noticed a lot of not so friendly things which should work but don’t work plus other things which should handled well but always is some excuse… Guess nothing compares to old days - PEEK and POKE :wink:

But after I see that even apple can make things funny with classic calculator app for iOS then I will stop here and will not tell more about it since that maybe will be misunderstand from side of others.

Only will say to Xojo team to put more energy and make Xojo bigger and greater tool.

Why Xojo should like Visual Studio…?

Mean come on people Xojo is unique tool and should stay as it’s but improved to provide today’s and tomorrow coding challenges… and putting universal IDE for everything will just slow down a development of Xojo.
It’s better to have one tool for different things (Mac, Win, iOS…) rather then a bunch of things which works partial.

Been there done that had it happen (well it was a UPS truck but …)

[quote=357200:@Scott Cadillac]In my experience, the problem isn’t what language you chose to build with. It’s a staffing issue that the company is ultimately responsible for, not you.
[/quote]
The knowledge embedded in any ONE persons head, regardless of where they are in the company, is a valuable resource. And when you lose people one at a time, or en masse, its brutal as you then start to realize that people are NOT replaceable parts like cogs in a machine
You can capture some of this by making sure you have decent policy & procedure manuals etc but theres still a lot that you can never replace. Personal relationships with vendors, customers, & suppliers are just that - personal. And what that person cultivated you may be able to assume as their replacement; and you may not as the person on the other side may not like you etc.

Javascript is awful. It’s only popular because it’s necessary. This starts off about Ruby, but quickly gets into demonstrating how insane Javascript is: https://www.destroyallsoftware.com/talks/wat - and that just scratches the surface.

Not to mention humanity produces roughly 1,000 Javascript libraries per month.

1 Like

I’d use Typescript rather than plain javascript

Wow, that’s a real bummer. Hopefully all is good now.

Well said.

Thank you for your feedback.

[quote=357231:@Scott Cadillac]Wow, that’s a real bummer. Hopefully all is good now.
[/quote]
He was ok after a fairly long rehab - about 2 years in total (his jeep was another story)
But in the mean time I had to work at his house because he could hardly move
I needed to pick his brains on some things we were working on
Its when I developed tendonitis and bursitis that has made working in this business tricky
That was > 20 years ago
Tendonitis in wrists & elbows is a bitch to get rid of when you work on a keyboard all day

JavaScript is not awful. It is actually quite a good and powerful language. In many places it is just too forgiving, so you really have to know the language to use it properly.

In my view the wrong way to learn JavaScript is to start writing small pieces of code for a website. And stay with that. You’ll run into the same issues again and again, because without learning it properly, you will never get why something works differently in JavaScript. Most programmers using JavaScript are just copying code pieces from StackOverflow and the like.

You Don’t Know JS

[quote=357249:@Eli Ott]JavaScript is not awful. It is actually quite a good and powerful language. In many places it is just too forgiving, so you really have to know the language to use it properly.

In my view the wrong way to learn JavaScript is to start writing small pieces of code for a website. And stay with that. You’ll run into the same issues again and again, because without learning it properly, you will never get why something works differently in JavaScript. Most programmers using JavaScript are just copying code pieces from StackOverflow and the like.

You Don’t Know JS[/quote]
You’ve just described exactly why it’s awful. A good language should have well-defined rules and predictable outcomes. If O’Reilly publishes a book called JavaScript: The Good Parts, it obviously has more than its fair share of warts.

… why you think it’s awful.

I’ve been making a living from software development for over 20 years now, for the last 11 or so I have had to use JavaScript (and PHP) for client work nearly 100% of the time. Both are dynamic “C style” languages.

I think it’s quite telling that when I have a choice I use languages like Xojo or Elm, statically typed compiled languages, neither clutter the syntax with redundant symbols (";" is optional in JS but if you don’t use them you’re a fool as you’re in for a world of hurt, believe me). Compiling means you get upfront feedback that your code is “good” bar actual bugs in your implementation rather than getting runtime errors for simple syntax errors. And the cleaner syntax in both Xojo and Elm makes comprehension so much faster when you return to the code that syntax errors and implementation bugs are far less likely.

I find coding in languages like Xojo far faster and less likely to have bugs than when using languages like JavaScript. JavaScript has its leader status because it’s the browser language, it’s fantastic that we have alternative languages like Xojo to help us keep some sanity.

For one thing… it’s not a typed language. You get all sorts of bugs due to type conversions the same way you do with Variants in Xojo.

And Take this for example…

[quote]= for assignment
== for equivalence
=== for explicit equivalence[/quote]

I feel that XOJO is syntax heavy and has too many missing language features. (Lambdas, Generics, Object wrappers for Primitives, Proper Enum Introspection)
This makes it easy to read but annoying and cumbersome to write.

Javascript is without a doubt too open and causes all sorts of problems. These are all addressed with Typescript which was designed buy the guy who did C#. They almost start to read identical in most cases. And being able to catch errors at the time of writing rather than after compiling and running the code is pretty much a must now-a-days.

JavaScript isn’t language - it’s scripting tool and nothing else.

PHP is Hypertext Preprocessor and can be consider also as server scripting tool but also can be used as general purpose scripting tool.


People with older experience can remember what was batch files (.bat) under DOS or even what challenge was to make as much smaller app in ASM which will make nice looking math fractals also in old age era of PC.
So that’s is now days same when your comparing different kind of let say tools. On one end you have some batch script and on other you have linked and compiled code on low level which do a things.

After all it’s not important which tool your using since it’s most important what a master you are.

I get the feeling the reason you like it is:

Which is the. main. reason. people run into problems.

To a certain point, a agree to this comment

[quote]I feel that XOJO is syntax heavy and has too many missing language features. (Lambdas, Generics, Object wrappers for Primitives, Proper Enum Introspection)
[/quote]
But the language was conceived to be simple and safe, so its a compromise. What I miss most is Python slicing, string formatting, some more native types (complex, fast/traditionnal arrays), better type conversions and a framework including whats available in standard libs in other languages/env.
Still a very useful tool in crurent form.

[quote=357324:@Philippe Schmid]

But the language was conceived to be simple and safe, so its a compromise. [/quote]

I wrote about this in the first part of my review series of Xojo: http://www.dev.1701software.com/blog/xojo-in-2017-part1

Lambdas, Generics, etc. are all optional features. Enhancing the language to make us more productive does not inhibit the hobbyist factor and I think should be pursued.

One of the interesting nuances of Xojo versus other languages is a lack of a thought leader in regards to the language itself. Geoff certainly represents the business objectives and overall purpose of the tool. However I feel the language itself takes a back seat to the IDE, compilers, Cloud, etc. that Xojo offers.

I would like to see one of the Xojo engineers be fundamentally in charge of the syntax and writing blogs and scoping out new opportunities to catch up to newer ideas in computer science. Maybe Javascript isn’t that new idea we want to implement for reasons that have been discussed. That does not mean that ALL of the ideas presented by javascript lack merit.

Too often I think the incremental changes of the language if/when we get them is just a side effect of some other necessity. Would we even have a new Xojo framework if iOS did not demand it? I think not which is plainly demonstrated in the lack of overall focus and usage. The entire Web/Desktop frameworks should have already been converted and legacy framework support should be a checkbox you enable in your project if you need it or migrated from an older version.

Surprisingly Xojo does or did offer for a long time a VB project converter which is substantially more difficult to manage then a simple Xojo Classic -> New framework converter yet one does not exist at all.

So debating Xojo language nuances is a fun exercise but in my opinion mostly irrelevant to the day to day operation of Xojo, Inc for better or worse. I would love to be proven wrong.

Please dont mistake a lack of public pronouncements and debate about the language and features as a total lack of internal debate and discussion about them

Sure but just like future Xojo features that you rarely tell us about or do not give us deadlines about… we are aware work goes on behind the scenes but we cannot count on when or what will be available. All I am saying is I would like to see a language czar who pushes the language forward. If Xojo chooses to keep those discussions hidden away that is perfectly fine but do not be surprised when we ask for more!

That is not per se a bad thing.

[quote=357287:@Greg O’Lone]And Take this for example…
= for assignment
== for equivalence
=== for explicit equivalence[/quote]
These are three completely different thing and the code should reflect that. So this is actually a plus IMO.

Of course JavaScript is a proper programming language, why would it not be?

[quote=357316:@Tim Parnell]@Eli Ott Most programmers using JavaScript are just copying code pieces from StackOverflow and the like.
Which is the. main. reason. people run into problems.[/quote]
That is not the problem of the programming language…

Sorry to disagree, but debugging JavaScript is terrible because of this. When you can’t tell by looking at a function definition what you are supposed to pass, you’re going to have errors. Especially on large projects with multiple developers.

And if people used them correctly, I’d agree. I see errors in the usage of == vs === all the time.

[quote]
Of course JavaScript is a proper programming language, why would it not be?[/quote]
You ought to watch the video of Douglas Crockford (father of JSON) talk about JavaScript (also JavaScript: The Good Parts).