Hello caseih,
Unfortunately I wrote a lot of Python so there is no possible way to convince me to write or to not.
Python is a programming language and programming languages are like tools. I use tools when I have to and I never make fun of them. I will never make fun of a Philips screw driver because it cannot unscrew a Din912 screw... See my point....
In the beginning I used Python to write scripts to render models using Poser3D for video games and later for almost all kind of things for gaming platform backends. Coming from C# and Java to the snake universe I soon realized that Python is not just horrible... it is horrible and full of Runtime surprises like any other interpreted language. Runtime surprises is what all devs needs to turn their day into a really busy day...
The other horrible thing of this interpreted language, like most interpreted languages, is that they made it to write code fast and fast means that it is a Dynamically-typed languages. Variables can change types on every CPU cycle making everything incredible flexible and vulnerable at the same time. This is the reason Python and other Dynamically-typed languages are not used for enterprise scaled applications.
But what about Facebook? Facebook is written in PHP and PHP is an interpreted Dynamically-typed language exactly like python ??
Yes. I already know that and I am sure that if they knew how big Facebook would be today, when they started writing it, they would probably choose an other solution like C# or Java.
As for the Syntax... If I gain access to your SVN/Git repository tonight I can change your whole software's logic if I delete 4-5 tab characters. This is something that cannot happen with BASIC BASIC, Java, C, C# and even Javascript. Yes.. A syntax that can be destroyed if I delete a tab is not just bad, it is horrible.
As for the glue language... I bet you are missing GraalVM (
https://www.graalvm.org/) the polyglot Virtual Machine by Oracle. You can write Java, Python, Javascript, R, Ruby and run them using Java Virtual Machine. If you love python you will love it. You will feel the difference instantly.
For me, as I already said, Python is a tool. It is slow, dumb, fragile but if someone is paying me to use it then "Yes sir! I will write snake code for you!" but I will never use it for my personal projects.
To be fair I have to admin that Python brought programming to none programmers and this deserves a huge thumbs up.
Python is the BASIC language of our days and the BASIC language of the future.
caseih wrote: ↑Sep 14, 2022 14:52
Few programmers in other languages (python included) will ever switch to FB despite your toy benchmarks or your opinion of the language's syntax. I don't think you will ever quite understand the reasons. But that's completely okay. FB is a wonderful language and project, no doubt about it. Pretty amazing for a small group of volunteers.
Vinion wrote: ↑Sep 14, 2022 6:30With this benchmark
I am not comparing programming language features or how clever a developer can be.
Well it turns out language features are what programmers take advantage of to be efficient and write code that performs well. So you'd be a fool to not take advantage of a language's features if you were selecting an appropriate language for a task!
I am comparing how fast a programming language can do a for loop, the most basic loop in the history of programming, and add data to an array.
Yes I figured you would say that. Indeed the overhead of an interpreted language at running a tight loop will be much greater. Did you also benchmark QBasic against FB? Turns out that benchmark tells you almost nothing about a language's performance in the real world. I think my pure python example illustrates that nicely, as well as the numpy results (numpy is
always used by programmers who need fast math).
Python is a horrible programming language. It has a horrible syntax and it is horribly slow. On the other hand BASIC(FreeBasic) has the most humane syntax and it is 170times faster than the snake...
Yes you keep saying that but it doesn't make it true, certainly not for every task and for every person[1]. You have an opinion, just like we all do. That is all. Syntax is a matter of taste. For me Python is not "slow" at anything I've done with it and the syntax allows me to code at a rate that far exceeds what I've done in any other language---that's the primary reason Python is so popular. I've worked in many languages over the years including C, C++, Java, C#, Pascal, and also FB. But the cool thing is working in Python does not prevent me from also using compiled languages, even in the same project. That's one of the great things about python: other languages complement it nicely; it's a glue language. Python is way faster than FB at particular tasks, such as parsing and filtering text files (something data scientists do every day). Sometimes a Bash shell script is faster yet. All depends on the task. It's wonderful to have so many tools available at no cost. FB, GCC, Python, Bash, Perl, or even Go and Rust if you were inclined. Programming future never has been so bright.
My goal is not to convince you to use Python---in fact I recommend you avoid Python. Just use caution when presenting your opinions as universal facts. And take benchmarks with lots of salt.
[1] A language I regard as truly horrible is Javascript. However many, many people love Javascript and write amazing and blazing-fast things with it and totally love it and it's ugly syntax. Javascript is fast becoming the world's most widely-used language.