Advanced Computing Environment
brix-os project page
Hyphens, Spaces and Operator Splitting
I really want to use hyphens in identifiers and non-alphanumeric characters would also be really nice and expand the namespace. This would however require whitespace between ALL tokens and spaces around operators might create a learning curve for developers who don't normally use them. The IDE would highlight tokens based on unknown identifier, known identifer, operator, etc so there would be visual cues pointing out typo errors when spaces aren't used.
There would of course be exceptions to the rule. Comma, semicolon, period and colon would all be split from other characters but not sequences of themselves. This would allow for , ,, ,,, . .. ... : :: ::: ; ;; ;;; tokens. But splitting colon would prevent the := operator.
CamelHumps vs Underscores
Exported identifiers could prohibit the usage of underscores and force external interfaces to use camel humps. Internal identifiers and variables could use underscores to differentiate them from external interfaces.
Type Naming Conventions
Common types (List, Array, Number) prevent variables and parameters from using names like list, array and number. Types are first-class objects and must remain in the same namespace, but a prefix (TList, TArray, TNumber) would make them less readable.
The NOT operator can invert a Boolean or toggle the bits in an unsigned value. The <> operator makes more sense than the != operator. It would be better to have this character available to denote destructive versions for functions and extensions, even if the IDE can visually highlight them without it. Having sort and sort! functions that create a new collection or modify an existing collection. The !== operator would be a problem and must first be solved, could just drop it and use NOT with ===, or maybe <=>.
Copyright © 1995-2017 Brand Huntsman