3 ms·
Similar features of C probably, but with many differences (and probably different syntax too). Specifically, I would want to have such things as: - Good docume
by zzo38computer 4y ago
Similar features of C probably, but with many differences (and probably different syntax too). Specifically, I would want to have such things as:
- Good documentation.
- Always twos complement. (For one thing I would have -fwrapv being the default setting.)
- Reduce some undefined behaviour, so that more of the behaviour is defined or partially defined.
- Types specifying how many bits, or can specify in terms of other features (e.g. pointer size).
- Not Unicode.
- Avoid the confusing syntax for types that C has.
- The C comment syntax has /* even though / followed by * would be a valid sequence in C, so, such a conflict should be avoided in a better programming language.
- Parameterized types.
- Must still have the goto command.
- More powerful macros and preprocessing (including auto-generation files too), including a superset of the capabilities of C, but with possibility of hygienic macros, too.
- Better namespacing possibility than C.
- Does not need too many extra libraries than C, and can be used with any libraries for C programs (including possibility to be called from C codes, too).
- Many of the GNU C features.
- Associated data with types (which may include functions, constants, numbers, strings, other types, etc).
- You can still use pointer arithmetic, etc like is also possible with C.
- String type being the length and pointer to beginning of data; this way you can easily make slices. For compatibility with C codes, they will by default also always having the null terminator after the data, too.
- A few additional things, too.