DEV Community

Cover image for ๐Ÿ”ฐ NeoBASIC Language: Transpiler to C++ (and others)

๐Ÿ”ฐ NeoBASIC Language: Transpiler to C++ (and others)

NeoBASIC is a programming language I'm creating, still in the design phase, aiming to provide a better development experience while transpiling code into a compiled (and general-purpose) language. It's somewhat of an elastic language, combining the best of both worlds: Python (prototyping speed) and C++ (execution speed). The mention of BASIC is due to its faster learning curve, an effort I've been making to ensure the language can be used by computer science beginners.

From the Past to the Present of Programming

In the 70s and 80s, computer magazines contained BASIC programs for enthusiasts to type into their personal computers and calculators. These were short programs, often scripts or small routines. Some contained dozens of lines and required more time and care in typing. But this was never a problem for those who enjoyed programming.

In the 1990s, these magazines began to be sold with CDs because the programs were bigger. And they kept getting bigger every year. They increased in size and also in number, because the internet brought HTML and CSS files, along with JavaScript programs - and some scripts in PHP, Python, Perl, or Ruby. And the software also became more diverse; there were now more options like utilities, editors, games, etc.

Today, any utility software contains hundreds or thousands of lines of code. Large game productions can reach millions of lines of code, and operating systems contain, on average, tens of millions of lines. Previously, a software project in BASIC contained only 1 or 2 files; now, any project has dozens or hundreds of files, often distributed across multiple repositories and written in multiple languages.

Next Generation Languages

In a few years or decades, it will be quite common to find software with millions of lines of code, making use of various languages. I believe this scenario will contribute to the emergence of new languages โ€‹โ€‹that are more readable and concise. A new generation of languages, each for a specific purpose and designed to be used together (such as HTML, CSS, and JS).

Software is already ubiquitous, and it will be even more present in our lives in the future. The difference is that it will be much larger, on an order of magnitude that would be impractical today. We will certainly need artificial intelligence to help us maintain this entire infrastructure. We will be writing less and reading more, and also debugging and tracking code more and more. Automating tests to validate all this AI-generated code will also be essential.

We will continue writing code, but we will also increasingly work on assembling and combining pre-built software components, like pieces of a puzzle, to create solutions more quickly. Aided by AI, the programmer will become not only the one who codes (less and less), but also the one who orchestrates the software architecture. This is how the idea of โ€‹โ€‹NeoBASIC was born.

NeoBASIC Language Identity

The word NeoBASIC expresses a new programming language initiative for beginners, just as BASIC once was - an acronym for Beginner's All-purpose Symbolic Instruction Code. The NeoBASIC grammar is designed to help beginners learn programming more easily, and provides the necessary tools to build reliable, efficient, and high-performance software.

The emoji ๐Ÿ”ฐ is called Shoshinsha Mark (or Wakaba) and indicates a beginner driver. It was created in Japan to be affixed to the exterior of the car, indicating a novice driver who recently obtained a driver's license. I adopted the symbol ๐Ÿ”ฐ as the language's logo to establish that the language should primarily cater to beginners, always remaining simple and legible for them.

The mascot of the language is a chimera called ZECA, an acronym for "Zero Effort and Cost in Abstractions". NeoBASIC is a language based on the concepts of zero-cost abstraction and zero cognitive effort, in which the resources and abstractions provided are easy to assimilate and do not impose any performance overhead at runtime.

My Opinion on AI

In March of this year, Anthropic's CEO, Dario Amodei, stated that in 3 to 6 months AI would be writing 90% of the software and, in 12 months, we could get to 100%. Jensen Huang, CEO of Nvidia, went even further, stating that programmers would soon be obsolete and that it would no longer be necessary to teach programming to children. What a load of rubbish: recent research shows that the use of AI in software engineering is already significant in large companies, but the total code generated by AI accounts for between 20% and 40% in internal projects. We are still far from 100%.

I'm quite skeptical about the use of Vibe Coding for commercial software and the use of English as "the new programming language" - nothing against Andrej Karpathy. I'm not an expert like him, but from what I've been able to absorb so far, LLMs are non-deterministic and hallucination is part of it (it's not a bug, it's a feature). For quite some time, we still won't be able to trust the code generated by LLMs in the same way we trust the machine code generated by compilers. Regarding English for programming, this article "On the foolishness of natural language programming" by scientist Edsger W. Dijkstra explains this issue well.

Technology is evolving, and AI will certainly be of great value, but as a tool, not as a replacement for programmers. My opinion is that AI will be essential to level the playing field between large and small companies, because any entrepreneur will be able to use the same technology used by multinational corporations to create software that may be better and faster. This will increase competitiveness and require that the time to launch new products be increasingly shorter. Creativity is already the great differentiator today.

AI might eliminate some jobs, but it won't be the end of work. Maybe you'll lose your job to AI or to someone who knows AI, as they say on Linkedisney. Or maybe you'll trade your job for your startup (or cooperative) and use AI to compete with your former employer. I know that not everyone has an entrepreneurial spirit, but when "the water reaches their necks," everyone will have a great incentive to make the transition; especially since everyone has bills to pay.

Build in Public

This article is an announcement (and invitation) for this project that I started this year and which still has a long way to go. I decided to adopt a "build in public" approach with weekly updates, aiming to gather as many suggestions, criticisms, and lessons learned as possible from other programmers. Any and all opinions are very welcome.

I haven't yet addressed the structure of the NeoBASIC language because I found it more relevant to provide some context for its conception. However, in future articles I intend to present the language in more detail and how it aims to solve certain problems, highlighting some innovations (and quirks) in syntactic constructions that may even inspire the design of new languages. Currently, I am developing an overview topic similar to this โ€œOdin Overviewโ€ page from the Odin language - I thought it was really cool how it was done.

Nobody does anything alone in this world. If you want to follow the work, or contribute in some way, access the project page at GitHub/NeoBASIC or visit the website at www.neobasic.org to learn more.

๐Ÿ–– Wishing you a long and prosperous career.

Top comments (0)