Hey all! I've been looking at and trying to understand languages like Brainf**k, which were amusing yet complicated. So then, that made me think - what does a language have to have in order for it to be considered a programming language?
I quickly sketched this up, all it will do is print text into the console:
Code:
Module Module1
Sub Main()
Dim Code = IO.File.ReadAllText("C:\Path\testLanguage.txt")
Dim IsPrinting As Boolean = False
Dim i As Int32 = 0
While i < Code.Length
' Print a letter.
If IsPrinting Then Console.Write(Code(i))
' Check for commands.
Select Case Code(i)
Case "p"c ' A print command
If Not IsPrinting Then
IsPrinting = True
i += 1
End If
Case CChar(vbCrLf) ' A new line command
If IsPrinting Then
IsPrinting = False
Console.WriteLine()
End If
End Select
i += 1
End While
Console.Read()
End Sub
End Module
Which will read programs like this:
(Obviously, that will print Hello World!)
EDIT: I updated it and gave it more commands.
p = Print
c = Comment
i = Wait for input, store it (as string, in the interpreter. Is that cheating?)
v = Print string variable
Code:
p Hello World!
p Am I a programming language?
c The current 4 commands are: c (Comment) p (Print) i (Input) v (Print Input)
p Type any string below:
i
p You typed:
v
p Goodbye!
Which would read:
Code:
Hello World!
Am I a programming language?
Type any string below:
> I typed this.
You typed:
I typed this.
Goodbye!
This language is by no means useable, but does even something like this get a title of being a programming language? Or does it need...which is what I'm asking, I don't know what it would need. So what makes a programming language a programming language?