back
▲ 5 points

Ask HN: If you created a language, what aspects of other ones would it have?

by Austin_Conlon·7y ago·2 comments·view on hn ↗
2 comments
A higher layer to the primitives. While still providing options to the lower layers.

For example, having multiple layers to the concurrency primitives. Something like goroutines but allowing the programmer to create native threads.

Also, I like how golang has these neat functions to connect to services as opposed to the way most other languages (like c/python/etc.) do them by creating sockets. Perhaps this would be something that would be part of the standard library and not the language?

This is all coming from an average developer with no experience in creating a language.

I would like to have very explicit typing.

I'm not sure, that any language has this, but i would also like to add (optional) units to a language... The python package "pint" is an example of a pretty nice implementation: https://pint.readthedocs.io/en/0.9/

Like pseudo code:

int i=1;

i.unit = Unit.KG;