
Gambas: Visual Basic on Linux - galfarragem
http://gambas.sourceforge.net/en/main.html
======
1wd
[http://gambaswiki.org/wiki/doc/diffvb](http://gambaswiki.org/wiki/doc/diffvb)
lists "Differences From Visual Basic" and says "Gambas is not intended to be a
clone of Microsoft Visual Basic" and "you can't simply copy your VB projects
over and expect them to compile under Gambas".

~~~
jsjddbbwj
>Thankfully, in Gambas you cannot use GOTO to trap errors! Instead, use CATCH,
FINALLY or TRY

For error handling goto is generally much clearer than using exceptions.

~~~
stan_rogers
The construction being referenced is On Error [ERR_NO] Goto LABEL, which is
not usually local to the error, and, depending on the dialect may be a generic
handler that first needs to figure out what error it's handling.

~~~
rsynnott
Or, worse, and common in classic VB, ON ERROR RESUME NEXT. Which just skips
the line that errored.

~~~
throwaway3neu94
It sets Err. Which is essentially how SH, C and Go work too.

(With the obvious exceptions of longjmp and panic/defer, global vs local var,
and Go forcing to assign the error.)

On Error Resume Next isn't great, but calling it much worse than On Error
Goto, or much worse than other languages, is a stretch.

My point is only that people complain about it in VB disproportionally often
compared to other languages. (Does that mitigate the issue to some extent, if
every VB dev is super aware of it?)

~~~
rsynnott
I don’t think I’ve ever seen any vb code which actually checks that, though,or
dry little, certainly. In C and Go you get something returned, which is a hint
that you should maybe do something with it. In VB a magic global variable is
set, and then generally ignored.

~~~
iforgotpassword
That's how I've done it. Enable it before the line(s) in question, then check
err.number, and add "On Error Goto 0" after that so you get the default
handler again.

Usually much cleaner than jumping to somewhere else, but that had its uses
too.

~~~
rsynnott
Ah. I was never actually a VB programmer, but I did have a few side-jobs
porting VB apps (mostly CRUD webapps) to something more modern in the mid-
noughties. My experience from that was that real world use of on error resume
next was to turn it on and leave it on.

------
haolez
In the same vein, we have Lazarus vs Delphi:

[https://www.lazarus-ide.org/](https://www.lazarus-ide.org/)

~~~
sigzero
That's a solid choice is this arena.

~~~
TurboHaskal
For open source, I don't think there's a better one.

(Multiplatform) GUI is one of those things you really have to throw money at
if you value your time.

~~~
swiley
Really? What’s wrong with TCL/TK?

~~~
xet7
There is nothing wrong in TCL/TK. TCL/TK has:

1) SafeTcl for running untrusted code

2) AndroWish for making Android apps

3) Wapp for web apps

4) Embedded SQLite database

5) Expect for automation

6) TclKit for single binaries

7) Hecl for running Tcl code on Symbian devices

8) Fossil that is better than git, stores repo in much less space.

It's not like there is anything wrong in any programming language, when it's
still getting features, fixes, security fixes etc.

Problem is, when there is existing large VBA/VB6/VB.Net/Excel etc apps and
Microsoft stops developing Visual Basic language.

------
ghenne
For Windows, MacOS, iOS and Android: check out AppStudio. It lets you code in
VB like BASIC. A VB like Design Screen lets you drag and drop visual controls.
Output is JavaScript/HTML so it runs everywhere. (Disclosure - I'm on the
team) [https://www.appstudio.dev/](https://www.appstudio.dev/)

------
StavrosK
This is fantastic. I've lamented the lack of a good GUI and environment for
making desktop apps since VB 4, but it looks like they never went away.

Gambas looks fantastic, and exactly as easy to develop with as I remember VB 4
being. I can't say I can stomach the language it uses, but something like this
for Python would be a godsend.

~~~
oodlealistair
Check out Anvil: [https://anvil.works/](https://anvil.works/)

~~~
StavrosK
This looks nice, thank you. It's only web apps though, right? Ie no native
components.

------
canada_dry
Speaking of Visual Basic... this tool (Windows based) that let's you
quickly/easily develop an simple Android app using a flavour of Basic:

[https://www.b4x.com/b4a.html](https://www.b4x.com/b4a.html)

The developer recently released the tool's source and made it free.

It's a mature tool with lots of community support. It also has a pretty slick
GUI Android screen designer (Win only - but works in WINE).

It might even be feasible to get the Gambas tool to work with the B4A Android
Bridge and Designer.

~~~
gramie
It's worth noting that the same developer has free tools for desktop (Java)
and Raspberry Pi applications, and a paid tool for iOS.

All of these use the same dialect of BASIC, and I believe they can use (but
don't have to) a cross-platform GUI.

------
some-username
About the same time that "Microsoft plots the end of Visual Basic"
([https://news.ycombinator.com/item?id=22570684](https://news.ycombinator.com/item?id=22570684)).

------
pcdoodle
I can't believe I haven't heard of this, it looks awesome. Looks like it can
compile web apps too?

~~~
themodelplumber
[https://gambaswiki.org/wiki/comp/gb.web](https://gambaswiki.org/wiki/comp/gb.web)

I remember reading about this some time ago, like almost 10 years ago. So you
have to wonder if there are businesses out there using Gambas web apps without
knowing it. :-) Some of the developers who use Gambas are very experienced.

------
tenant
_The phenomenal quantity of bugs and inconsistencies that makes Visual Basic
so delightful persuaded me to start this project_

 _It seems that Microsoft was aware of the poor quality of its language, as VB
.Net is not backward compatible with older versions of Visual Basic._

 _I dislike the bad level of common Visual Basic programmers, often due to bad
pratices imposed by the bugs and strangeness of this language._

Pity he couldn't resist taknng a swipe at vb and vb programmers in his
introduction. Also he's inaccurate wrt to his comments about why Microsoft
didn't make a vb7.

------
drenginian
Sourceforge? Is this an old post?

~~~
pjmlp
Not everyone is jumping into Github.

~~~
MagnumPIG
No but everyone should jump away from SourceForge after the shady crap they
pulled. Gitlab is also a thing.

~~~
tssva
SourceForge has now long been under a different ownership then when the shaddy
crap happened. Since ownership changed there has been no shaddy behavior.

~~~
lostgame
I wasn’t aware of this - and it’s a testament to the fact that sometimes there
are no second chances after image and trust is destroyed.

------
jxub
"Gambas" means prawns in Spanish

~~~
eternauta3k
Also slang for legs in Argentina.

~~~
Mrat
And for AR$100

------
kwhitefoot
Would be good to have a cross platform version of this. I wonder how difficult
it would be?

~~~
protomyth
Xojo does it, but they are a long time commercial effort (RealBasic).

~~~
pcdoodle
Xojo is a solid paid solution. I use it all the time.

~~~
saturday14
Could you please talk about what kind of projects you are using it for? Do you
use it for serious projects or just toy ones? Web or mobile?

I looked at the site, this sounds interesting. Just interested in hearing it
from someone who uses it

~~~
pcdoodle
Well let's say you need an app to program IP addy info into a IOT device on
the LAN. Multi-platform done in 1 hour. You can also write web apps, drag and
drop, we're really excited for the web 2.0 coming this year.

------
fortran77
It's not "Visual Basic". At best, it's a basic done in the same "spirit" as
Visual Basic.

