Well, I think for a script languages and especially for people who are not so familiar with programming a mandatory semicolon is more annoying than useful.
And I don't like optional syntax in this case. It will only confuse people if sometimes there is a semicolon and then not.
It is superfluous and can be easily forgotten. A statement/expression ends logically at the new line, except if it is still open (e.g., no closing parenthesis yet, or RHS of an operator is missing).
At the moment a semeicolon is not used in the TeaScript syntax at all. So, placing a semicolon...
Thank you very much for your wishes! :)
Just for clarifications to other readers: The TeaScript C++ Library is usable for "home brewed" (personal/family) things for free as well as for other things which are noted in the license.
The TeaScript Host Application can be even used for any...
No problem, maybe next time I will introduce the TeaScript C++ Library directly here with all information included :laugh: ;)
Yes, there is a lot of advantage instead of spawning bash or whatever script.
If you use the TeaScript C++ Library you can access and manipulate the variables before or...
Where do you found "this only example"?
Take for example the "file io test" included in the download bundle and also readable on the download page:
Download page for TeaScript
If you read about the capabilities of TeaScript (all also observable via the comparison article above) then you can...
Do you know C++ Script Libraries for extending C++ applications dynamically during runtime ?
In this article you will find a brief overview about existing scripting libraries embeddable in C++ applications:
Comparison of C++ Script Libraries.
The article is good for get a nice high-level...
Wow, the forum software us producuing really strange results. It messed around with links in other threads as well.
Probably it does not like to highlight text and then transforming it into a link.
Edit is not possible as well.
So here is a fixed link, hopefully.
Script Language comparison for...
I wrote an article for a brief overview about existing scripting libraries embeddable in C++ applications:
https://tea-age.solutions/2023/01/31/script-language-comparison-for-embed-in-cpp/
The article is good for get a nice high-level overview as a starting point.
The reader may then dive...
UPDATE: TeaScript 0.9.0 is released.
Now also for Linux and as C++ Library (header only, no deps for fully C++20 compilers!)
TeaScript C++ Library is now on Github as well:
TeaScript C++ Library GitHub Repository
The Download package on my site includes more example scripts:
TeaScript...
Ok, I checked Python in more detail.
Since you can write
instance = SomeClass( 123 )
and this will call the __init__ function in SomeClass automatically, I agree also that this is a constructor in Python.
But the overall topic is C++ here ... ;)
No, Python does not have constructors. It is an init function, or more precise a factory function taking the reference of the object to be created as first argument. It is acting as a replacement for a constructor, yes.
Same in Rust. It does not have constructors but you can provide arbitrary...
Recently I created a benchmark for testing and comparing TeaScript and its competitor ChaiScript by computing the Fibonacci number of 25 recursively. The (pretty amazing) result is shown below. Shorter is better/faster, longer is slower. More in the blog post.
Here is the the source code (in...