7 ms·
It's a little surprising how many of the Python-favoring features are already present in C# 3.0; closures, syntactically clean properties, and a nicer array syn
by waldrews 18y ago
It's a little surprising how many of the Python-favoring features are already present in C# 3.0; closures, syntactically clean properties, and a nicer array syntax; between the yield keyword and LINQ, you get something close to generator syntax; reflection is pretty painless; and while there's no dynamic typing, there's a convenient type inference mechanism.
My personal pet peeve against Java is the lack of multiline string literals, also available in both Python and C#.
Java has some syntactic catching up to do.
- gojomo 18y agoI share your peeve. A request for multiline string literals is over 7 years old... http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4472509 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4472509 Reading the Sun bug database, it's clear who's held back Java's functionality and stability over the years: xxxxx@xxxxx, who on this issue back in 2001 wrote "This is yet another request for a syntactic sugar to save some user from typing. It's not worth it." I hope for the good of the platform xxxxx has been let go since then.
- michaelneale 18y agoAgreed. If I ever find xxxxx@xxxxx in a dark alley, he/she better watch out.
- michaelneale 18y agoNot just string literals - but a better literal syntax for maps and arrays would be really nice.
- michaelneale 18y agoInteresting article on how to kinda sorta do it using varags, generics and static imports (looks more like scala): http://gleichmann.wordpress.com/2008/01/13/building-your-own-literals-in-java-lists-and-arrays/ http://gleichmann.wordpress.com/2008/01/13/building-your-own...
- 13ren 18y agomultiline string literals... also available in C (using \).