Chat
is a programming language with syntax optimized for mobile device keyboards.
JavaScript, C, and most other conventional programming languages are cumbersome to write from a mobile keyboard, while Chat
is optimized to be written on your phone without any special software. For example,
- Phone keyboards tend to start each new line with the shift (capital) key on.
- In
Chat
, a capital letter (A-Z) denotes the beginning of a statement.
- Special characters that most languages rely on like
(&|{};)
are difficult to write from a mobile device.
Chat
prefers short words likeand
,or
, andfun
instead of&&
,||
orfunction
.
>>
indicates the output from the program
Print "Hello, world"
>> Hello, world
Comment this line will be ignored because it starts with the word "comment"
Comments
These lines will be ignored until the word capitalized word "end"
because of the 's' at the end of the word "comments."
End
Note: variables are case insensitive, Product is the same as product
Sum is 5 plus 5
Product is sum times 10
Print product
>> 100
X is 5
If x equals 5
Print "yay!!!!"
End
>> yay!!!!
X is true
Y is true
Z is false
If x and y or z
Print "yay!!!!"
End
>> yay!!!!
For i is 0, i less than 10, increase i
Print i
End
>> 0123456789
Note: "increment i" is eqivalent to i += 1 in most languages
I is 0
While i less than 10
Print i
Increment i
End
>> 0123456789
Fun add a, b
Return a + b
End
Call add 5, 5
>> 10
How can we enable the user to run and debug their code from the phone?
- A solution might be a website like replit that you can easily paste code snippets into and see the output.
If you find Chat interesting, potentially useful, or a bit silly, contact me! You can find my email in my GitHub profile, just mention Chat lang
or The Chat Programming Language, or something like that in the subject and I will respond as soon as possible.
Thank you,
Reid JS