Results 1 to 40 of 43

Thread: What counts as a programming language?

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2013
    Location
    Earth
    Posts
    230

    What counts as a programming language?

    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:
    Code:
    p Hello World!
    (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?
    Last edited by NinjaNic; Jan 8th, 2017 at 09:29 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width