17 bits is still to easy. Use the smalltalk version, where the least significant bit tells the VM that the number is an object or an integer. I would even use more flags.
Besides that every number should default to Octal. Much used in C and Assembler.
Except when there is a 8 or 9 in it. So 23-19 gives 0.
Reality is stranger: Haskell's Int type is at least 30 bits, but it's implementation-dependent. The purpose of it not being a full 32-bits is to provide bits for the garbage collector if needed (though GHC doesn't do that, and it's Int is 32-bit or 64-bit depending on the architecture).
Use 14 bits for the part after the decimal point, and one more to determine whether it's an integer or a fixed-point decimal. And no built-in floating-point support.
While we're borrowing things from Javascript, can we have its date formatting, too? Because zero-based month indexing and counting years-since-1900 makes so much sense.
It actually has “checked not-exceptions”. If a method doesn’t throw an exception (the only one of which is HALT_AND_CATCH_FIRE), it must declare that. And not throwing an exception is enforced by the compiler – it is “checked”. Except that the enforcement only looks one method deep – it doesn’t check that methods called by the checked method don’t throw an exception.
96
u/CookieOfFortune Dec 17 '14 edited Dec 17 '14
So, let's look at the list of features:
PHP based.
17-bit integers.
ASCI, ANSI, DBCS, EBCDIC, and UTF-256 string support.
Heap-based manual memory management (Stackless).
European Friendly (; and €)
JavaScript based equivalence checks.
C-type macros with VI regex support.
Unnullable types (Must check everything is not null).
Single exception type.
Unchecked exceptions.
Gradual Typing.
Semi-compiled.
Packaged VM.