-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Fausto German edited this page Nov 18, 2020
·
8 revisions
A general overview of what I imagine Hinton Script to be like.
-
Dynamically Compiled: The programmer runs a program by typing
$ hinton run {filepath}
on the command line. When doing so, the program will be compiled to machine code. After compilation, the program is not compiled again when running the same command on the same program. However, it is re-compiled when any of the program files get modified. - Object-Oriented: Hinton focuses on modularity, and brings the same system used by TypeScript for creating modules and packages. Any class, constant, or function can be explicitly exported from any program and imported into any other program. Also, everything in Hinton is an object.
-
Secure by Default: Similar to Deno.js, Hinton provides built-in security. It requires certain flags when a program performs actions that may put the users at risk. Some of the flags are:
-
--allow-network
: Grants permission to access the computer's network. -
--allow-read
: For accessing or reading any file from the file system. -
--allow-write
: For writing data and saving files into the file system.
-
-
Statically Typed: In Hinton, variable types are optionally inferred but required in function signatures. Once a type is assigned to an identifier, it cannot be changed (unless using the
flex
keyword).- Inferred type
- Variables (unless a value was not assigned upon declaration)
- Constants
- Class fields (unless a value was not assigned upon declaration)
- Type declaration required
- Function parameters
- Function return.
- Inferred type
- Feature Rich: The goal of Hinton is to make the programmer's life easier, and unlike any other programming language, it actually does so. Hinton provides tons of methods attached to the built-in types, as well as many packages and modules with a great focus on A.I, Mathematics, Physics, and the likes.
-
Built-In GPU Computations: Hinton would provide top-of-the-art APIs for executing algorithms on the built-in GPU of a machine. To use this, the programmer would have to run their script using the
--allow-gpu
command. -
Easy GitHub Integration: The HBM (Hint Bucket Manager) provides an easy way of creating a project. Just type
$ hb new {project name} --git
on the console, and the command line will walk you through all the files and folders needed for a general application, as well as the ability to integrate GitHub into the project. The files generated include:- ./.git (folder)
- ./.gitignore
- ./README.md
- ./package.yml
- ./_hintBucket (folder)
- ./main.ht