<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ethan Onstott</title>
    <description>The latest articles on Forem by Ethan Onstott (@stormprograms).</description>
    <link>https://forem.com/stormprograms</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F112993%2F7055eee2-1ffd-4244-bd83-13788100b1fb.png</url>
      <title>Forem: Ethan Onstott</title>
      <link>https://forem.com/stormprograms</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/stormprograms"/>
    <language>en</language>
    <item>
      <title>StormScript: Year in Review</title>
      <dc:creator>Ethan Onstott</dc:creator>
      <pubDate>Sun, 21 Apr 2019 02:39:11 +0000</pubDate>
      <link>https://forem.com/stormprograms/stormscript-year-in-review-2n21</link>
      <guid>https://forem.com/stormprograms/stormscript-year-in-review-2n21</guid>
      <description>&lt;p&gt;It has been over a year since I created the &lt;a href="https://stormscript.dev" rel="noopener noreferrer"&gt;StormScript programming language&lt;/a&gt;. Since then, I have not only fixed many issues with the language, but I have also introduced many new features to the language. In this post, I will go over them.&lt;/p&gt;

&lt;h1&gt;
  
  
  Syntax Changes
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Keyword Changes
&lt;/h2&gt;

&lt;p&gt;Initially, the keyword &lt;code&gt;out&lt;/code&gt; was used to print. This was a fine keyword, but I feel that &lt;code&gt;print&lt;/code&gt; would make more since in this setting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    out "Hello, World!";
}end;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;was changed to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    printl "Hello, World";
}end;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This change also allowed there to be 2 forms of &lt;code&gt;print&lt;/code&gt;, &lt;code&gt;print&lt;/code&gt; and &lt;code&gt;printl&lt;/code&gt;. &lt;code&gt;printl&lt;/code&gt; adds a newline to the end of the value that is printed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;@args&lt;/code&gt; was originally used to add function arguments. The problem with this is that it required the arguments to be on a separate line than the function.&lt;/p&gt;

&lt;h2&gt;
  
  
  The removal of &lt;code&gt;end;&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Originally, StormScript used &lt;em&gt;two&lt;/em&gt; ways to end a code block. Many people commented on this in my &lt;a href="https://dev.to/stormprograms/stormscript-my-thoughts-on-how-syntax-should-be-5ei0"&gt;first post&lt;/a&gt;. Not only would users have to put curly braces to end a scope, they would also have to put the &lt;code&gt;end;&lt;/code&gt; keyword.  This proved to be redundant and was removed.&lt;/p&gt;

&lt;p&gt;Code was changed from&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    printl "Hello, World!";
}end;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    printl "Hello, World!";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This not only makes long files look nicer, but it also saves time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Static to Dynamic Type
&lt;/h2&gt;

&lt;p&gt;StormScript was planned to be statically typed, but this changed after I realized how much this kills the readability of the language. As a result,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    str name: "Ethan";
    printl "Hello, ", name;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;would become&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    name: "Ethan";
    printl "Hello, ", name;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Comparisons
&lt;/h2&gt;

&lt;p&gt;As with any programming language, StormScript has many different comparison operators. These have not changed much over time, although StormScript uses keywords rather than symbols. These keywords are &lt;code&gt;is&lt;/code&gt;, &lt;code&gt;not&lt;/code&gt;, &lt;code&gt;less&lt;/code&gt;, &lt;code&gt;greater&lt;/code&gt;, &lt;code&gt;lesseq&lt;/code&gt;, and &lt;code&gt;greatereq&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Website
&lt;/h1&gt;

&lt;p&gt;In early March, I decided that StormScript should migrate to &lt;a href="https://stormscript.dev" rel="noopener noreferrer"&gt;its own website&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fqbdst4yu2siw9noatpuf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fqbdst4yu2siw9noatpuf.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  The Future
&lt;/h1&gt;

&lt;p&gt;Looking forward, I hope to publish version 1.0.0 by the end of the year. For now, &lt;a href="https://github.com/stormprograms/StormScript/releases/tag/v0.7.0" rel="noopener noreferrer"&gt;version 0.7.0&lt;/a&gt; just came out, and I am currently working on version 0.8.0. Here are some new things.&lt;/p&gt;
&lt;h2&gt;
  
  
  String Concatenation
&lt;/h2&gt;

&lt;p&gt;For string concatenation, I am using the &lt;code&gt;$&lt;/code&gt; symbol followed by a variable name inside of a string literal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    int i: randomrange =&amp;gt; min: 0, max: 100;
    printl i, " is my favorite number";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;is now&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    int i: randomrange =&amp;gt; min: 0, max: 100;
    printl "$i is my favorite number";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Live interpretation
&lt;/h2&gt;

&lt;p&gt;Live interpretation allows code to be run and changes to be reflected live. This would save variable states, as well as location. In the current development branch, live interpretation only reruns the program when changes are made.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;stormscript &lt;span class="nb"&gt;test &lt;/span&gt;FILENAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I am happy to say that &lt;a href="https://github.com/stormprograms/StormScript/blob/dev/src/core/live.sts" rel="noopener noreferrer"&gt;the file that runs live interpretation&lt;/a&gt; is completely written in StormScript.&lt;/p&gt;

&lt;h1&gt;
  
  
  Afterword
&lt;/h1&gt;

&lt;p&gt;Be sure to check out the website at &lt;a href="https://stormscript.dev" rel="noopener noreferrer"&gt;stormscript.dev&lt;/a&gt; as well as contribute to &lt;a href="https://github.com/stormprograms/StormScript" rel="noopener noreferrer"&gt;the repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I am happy to answer any questions you may have, so please feel free to ask.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>cpp</category>
      <category>stormscript</category>
      <category>linux</category>
    </item>
    <item>
      <title>StormScript: What's New and What's Better</title>
      <dc:creator>Ethan Onstott</dc:creator>
      <pubDate>Thu, 22 Nov 2018 05:03:10 +0000</pubDate>
      <link>https://forem.com/stormprograms/stormscript-whats-new-and-whats-better-64m</link>
      <guid>https://forem.com/stormprograms/stormscript-whats-new-and-whats-better-64m</guid>
      <description>&lt;h1&gt;
  
  
  Intro
&lt;/h1&gt;

&lt;p&gt;On Sunday I made a post explaining what StormScript was and why I believed it was important. Reception was mostly positive with people pointing out things they didn't like with the syntax. I changed two of them. I also changed the &lt;a href="https://github.com/stormprograms/StormScript" rel="noopener noreferrer"&gt;Repository&lt;/a&gt; so that it is easier to figure out where everything is. Additionally, I added class methods.&lt;/p&gt;

&lt;h1&gt;
  
  
  Syntax Changes
&lt;/h1&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;end;&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Both people who commented on my post talked about how they didn't like the &lt;code&gt;end;&lt;/code&gt; at the end of each code block. I agreed and had actually been thinking about changing this for a while.&lt;/p&gt;

&lt;p&gt;Before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    int x: 3;
    int y: 4:

    if x is y {
         printl x, " is equal to ", y;
    }else{
        printl x, " is not equal to ", y;
    }end;
}end;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    int x: 3;
    int y: 4:

    if x is y {
         printl x, " is equal to ", y;
    }else{
        printl x, " is not equal to ", y;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Function Arguments
&lt;/h2&gt;

&lt;p&gt;The way function arguments were declared was a nightmare. Originally I thought it was ok, but now I realize that it takes up &lt;em&gt;too much&lt;/em&gt; unnecessary space.&lt;/p&gt;

&lt;p&gt;Before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@args: int x;
func foo {
    printl x;
}

do{
    foo =&amp;gt; x: 3;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func foo =&amp;gt; int x {
    printl x;
}

do{
    foo =&amp;gt; x: 3;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Class Methods
&lt;/h1&gt;

&lt;p&gt;Class methods are declared the same as normal functions, but inside of a &lt;code&gt;type&lt;/code&gt; scope.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type person {
    int age;
    str name;

    func birthday {
        age+: 1;
    }
}

do {
    person p;
    p|age: 22;
    p|name: "Joe";

    printl p|name, " is ", p|age, " years old!";

    p|birthday;

    printl "It's ", p|name, "'s birthday. ", p|name, " is ", p|age, " years old!";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I think that the feedback I received is valuable and will make StormScript better. Please keep sending me suggestions.&lt;/p&gt;

&lt;p&gt;Of course check out the &lt;a href="https://github.com/stormprograms/stormscript" rel="noopener noreferrer"&gt;repository&lt;/a&gt; and be sure to contribute or open a feature request if you would like to see anything added. &lt;/p&gt;

</description>
      <category>linux</category>
      <category>cpp</category>
    </item>
    <item>
      <title>StormScript: My Thoughts on How Syntax Should Be</title>
      <dc:creator>Ethan Onstott</dc:creator>
      <pubDate>Sun, 18 Nov 2018 19:48:33 +0000</pubDate>
      <link>https://forem.com/stormprograms/stormscript-my-thoughts-on-how-syntax-should-be-5ei0</link>
      <guid>https://forem.com/stormprograms/stormscript-my-thoughts-on-how-syntax-should-be-5ei0</guid>
      <description>&lt;h1&gt;
  
  
  A Brief Introduction
&lt;/h1&gt;

&lt;p&gt;In most people's terms, I am new to programming. I am a high schooler with ~4 years of experience programming, one of which went into software development. I feel that to most people, it is strange that I already commit myself (no pun intended) to these kinds of projects. I do not write the neatest code. I write more functional code. With that said, I am looking for people to contribute ideas, code, and issue reports to my repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/stormprograms/stormscript" rel="noopener noreferrer"&gt;StormScript Repository&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stormprograms.com/stormscript" rel="noopener noreferrer"&gt;StormScript Docs&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Why Do I Want to Make This?
&lt;/h1&gt;

&lt;p&gt;For a long time, I have had very strong feelings about how programming is taught and how read. As much as I love C++ and JavaScript, I believe that syntax could be much better. What I mean is that we need more languages that read like Python, but are still very powerful. I understand that most, if not all of us here know many programming languages and are accustomed to these clunky, hard to write and read languages. &lt;em&gt;Let's Face it&lt;/em&gt;, they could be much better. &lt;/p&gt;
&lt;h1&gt;
  
  
  How is this any better?
&lt;/h1&gt;

&lt;p&gt;There are many reasons that I believe that StormScript fixes these issues. To show you, I will compare many languages with StormScript and why I think that it's better.&lt;/p&gt;
&lt;h2&gt;
  
  
  Functions
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Without Arguments
&lt;/h3&gt;

&lt;p&gt;C++:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="nf"&gt;givehello&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"Hello, World"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;    
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;givehello&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="sc"&gt;'\n'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In C++, namespaces are out of control and pretty much the entire library of standard C++ functions and types that aren't inherited from C requires &lt;code&gt;std::&lt;/code&gt; in front of it.&lt;/p&gt;

&lt;p&gt;Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;givehello&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, World&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;givehello&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;givehello&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, World&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;givehello&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Python and JavaScript are very readable and a little readable respectively, but both suffer from the same problem: They both lack a main scope, and just run code in what in other languages is usually the global scope. This kills readability because it is more difficult to sort out where you should put things and what needs to run immediately and what doesn't.&lt;/p&gt;

&lt;p&gt;StormScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func givehello {
    return "Hello, World!";
}end;

do{
    printl givehello;
}end;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you look carefully, you might notice that there is no parenthesis where arguments should go, and the reason is simple: &lt;em&gt;If you don't have arguments, you shouldn't have to reserve a space for them.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  With Arguments
&lt;/h3&gt;

&lt;p&gt;In almost every language, running a function works the same:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;functionname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"arg1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;arg2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;arg3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;StormScript arguments work in a completely different way. StormScript functions use the &lt;code&gt;=&amp;gt;&lt;/code&gt; symbol, which is usually used to declare an inline function. &lt;br&gt;
E.g. in JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; 
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In StormScript, &lt;code&gt;=&amp;gt;&lt;/code&gt; actually is reserved for running a function with arguments. The &lt;code&gt;@&lt;/code&gt; symbol is used to declare a function with arguments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@args: int x, str y;
func printxy {
    printl x, '\n', y;
}end;

do {
    printxy =&amp;gt; x: 3, y: "hi";
}end;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Classes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Background
&lt;/h3&gt;

&lt;p&gt;I could be alone in this, but it took me a &lt;strong&gt;long time&lt;/strong&gt; to understand what a class is in programming. Since the start of developing StormScript, I have always wanted to change the keyword for declaring classes from &lt;code&gt;class&lt;/code&gt; to &lt;code&gt;type&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Examples
&lt;/h3&gt;

&lt;p&gt;C++:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;human&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;public:&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;human&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gender&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"male"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Bob"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;" is a "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;" year old "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gender&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="sc"&gt;'\n'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;StormScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type human{
    int age;
    str name;
    str gender;
}end;

do{
    human h;

    h|gender: "male";
    h|name: "Bob";
    h|age: 22;

    printl h|name, " is a ", h|age, " year old ", h|gender;
}end;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;StormScript doesn't differ too much from C++ in how its classes work, but the main difference is that it uses the &lt;code&gt;type&lt;/code&gt; keyword rather than the &lt;code&gt;class&lt;/code&gt; keyword for declaration.&lt;/p&gt;

&lt;h2&gt;
  
  
  If statements
&lt;/h2&gt;

&lt;p&gt;StormScript has similar if statements to many other languages with one key difference, it uses &lt;code&gt;is&lt;/code&gt; instead of &lt;code&gt;==&lt;/code&gt; and &lt;code&gt;not&lt;/code&gt; instead of &lt;code&gt;!=&lt;/code&gt;. I made this change because I make the mistake of typing &lt;code&gt;=&lt;/code&gt; instead of &lt;code&gt;==&lt;/code&gt;, and because it makes it more readable.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do{
    str x: "hi";

    if x is "hi"{
        printl x;
    }end;
}end;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Be sure to check out the repository and documentation.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/stormprograms/stormscript" rel="noopener noreferrer"&gt;StormScript Repository&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stormprograms.com/stormscript" rel="noopener noreferrer"&gt;StormScript Docs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>python</category>
      <category>programming</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
