2 ms·
My future perfect "practical" programming language will have type inference, strong typing, and intrinsics for misc data structures. In other words, looks kinda
by specialist 5y ago
My future perfect "practical" programming language will have type inference, strong typing, and intrinsics for misc data structures. In other words, looks kinda like JavaScript, behaves kinda like Java.
This:
foo = { "apples" : 100, "bananas" : 20 }
bar = [ 100, 200, "oops" ] // error
Instead of this:
foo = new hashmap<string,int>
foo.put( "apples", 100 )
foo.put( "bananas", 20 )
bar = new array<int>
bar.add( 100 )
bar.add( 200 )
bar.add( "oops" ) // error
I believe, but cannot yet prove, this would eliminate 98% of the (popular) pressure (desire for concision) for adding generics.