Overview
Goto is a dynamically typed programming language built in Go, designed to meet various scripting needs. It provides core programming features including:
Data Types: Integer, Boolean, String
Data Structures: Lists
Operations: Arithmetic, Comparison, Logical
Control Flow: If-Else-If Statements, For Loops, Continue, Break, and Return Statements
Functionality: Scoping, Multiple Assignments, Operator Precedence, and Grouped Expressions
Goto also supports functions, built-in functions (such as
append, print, and len), and error handling, making it a robust tool for scripting tasks. This project combines the simplicity of scripting with the performance of Go, providing a powerful REPL experience.Installation
Goto can be easily installed via Go or binary releases:
Source Installation:
go get -u github.com/pandeykartikey/gotoBinary Installation: Available from the GitHub release page.
Key Features
Easy Scripting Syntax: Write scripts with minimal syntax using
var declarations, easy function definitions, and flexible loops.Dynamic Typing & Scoping: Enjoy dynamic typing, multiple assignments, and variable scoping to control visibility.
Data Structures: Leverage lists and indexing, making it easy to handle collections.
Error Handling & Control Flow: Implement robust error handling and control flows for cleaner code and easy debugging.
Example Code To define variables and execute basic arithmetic:
var a = 3; var b = 5; var result = a + b; print(result); // Output: 8Usage
To execute a script, pass the script name to the interpreter:
$ goto sample.toAlternatively, add a shebang to make scripts executable:
#!/usr/bin/env gotoStart the REPL by typing
goto, and exit with exit or Ctrl + D.0 likes · 31 views · Nov 3, 2024
Goto is an interpreted programming language written in go. - pandeykartikey/goto