⬆️ ⬇️

“Made in Russia” - WBASIC programming language for developing web server applications

Hello, Habr!



I suggest you pay attention to the project "Made in Russia" - the native language for web development. The project was developed in Yekaterinburg, and localization is not Western, which is very rare, since the programming languages ​​we have developed are not many.



WBASIC - Acronym Web Beginner's All-purpose Symbolic Instruction Code.

High-level programming language used to develop server-side web applications.



This is the dialect of the BASIC language, developed taking into account the work on the Internet in 2017, and the syntax of the language itself in 1964.

')

image



The philosophy of the language - it should be easy for beginners. And I hope I succeeded. All documentation on the language fits today in just 9 sections and you can master them in one or two days.



Project history



Start of development - March 23, 2017. The prototype was written in about a month.

After all the basic language constructs and operators were completed, this version was able to develop a website and a reference book on the language. After that, I came to the conclusion that I still have the first working version of the language. A total of 34 commands and keywords were supported in the language. In addition, debugging mode DEBUG, and simplified input of large text variables and arrays in multi-line mode.



The results I was struck by myself, I myself did not expect that I would be able to solve all technical problems and create a working prototype.



The next step was to develop a working, tested version with which you can remove the label beta, with the elimination of all the detected deficiencies in the prototype.



Start of development - April 20, 2017. Release - approximately May 2017.



The main drawbacks of the previous version are the lack of caching by the compiler, the code was compiled all the time before launching. Just a small set of eigenfunctions. In this version, a transparent cache was made on temporary files, which significantly increased speed. For this, we had to completely rewrite the DEBUG, INCLUDE commands, not counting the compiler itself. INCLUDE now connects files to only at the moment of executing this command, checking for the presence of a cache, as in PHP.



In addition, the service character parser was improved, with forward and backward character viewing, which changed the action "=" and "(", the IS, ISNOT, ISSET and EMPTY commands appeared. Now "=" means assigning arguments to certain commands and checking for equality in IF type expressions ... as in BASIC. By name and following it "(" the subroutine call is determined. Also, there were checks for the existence of data, the availability of data and their types and their deletion.



There are also service constants. In total, about 200 teams and reserved words with constants were added.



Advantages and disadvantages



Compared to PHP, you get a simpler and cleaner syntax for programs similar to Python, and ease of development. This is the easiest language of all server languages, the syntax is simpler than Python not to mention PHP.



The performance is approximately equal to PHP7, the development style is the same as in PHP - edit the files on the server, open the page, see the result, the compiler works by itself completely transparent.



There is a special debugging mode that allows you to see the entire script environment and errors, which is very lacking in PHP and is solved with the help of logging inserts.



PHP must be installed on the server, 5 or 7 versions are possible. But, since the compiler is written in PHP, you can use any of the 1500 PHP functions in addition to the 200 WBASIC commands, although it looks like a hack and you may not even need it, since the set of existing functions covers the needs of the average application. PHP was also originally written in Perl, but this did not prevent its distribution.



All string language commands fully support UTF-8, and the documentation is completely in Russian.



The compiler is quite flexible, you can change keywords in places or skip them inside commands, since command parameters are broken by keywords, rather than a comma, for example:



FOR I = 100 STEP -1 TO 0
FOR I = 0 TO 100 STEP 10


Visual Basic, WBASIC , .



, , , .



GitHub

Source: https://habr.com/ru/post/423713/



All Articles