
Ask HN: What features would you add in a computer language? - brlebtag
I was having a discussion with my co-workers about cool features to add in a computer language. I want to know what features would you guys add in a computer language?<p>I would add:<p>* traits
* PHP&#x27;s magic functions
* coroutine
* C&#x2F;C++ family syntax
* Java&#x27;s OOP
* Erlang&#x2F;Elixir&#x27;s concurrent model
* Elixir&#x27;s pattern matching
* C++&#x27;s templates
* C++&#x27;s operator overload
* python&#x27;s slice
* Erlang&#x2F;Elixir&#x27;s preemptive green threads
* package manager
* C#&#x27;s property
* async&#x2F;await<p>What about you guys?
======
RNeff
Assertions, pre and post conditions,invariants, strong typing, lots of self
checking features, design by contract. Features to make it easier to write
correct programs.

------
wfwefwef32
c++ static_if but for class members:

template<class Type> class A {

if constexpr (std::is_same<Type, int>::value) { int a; }

}

