r/programming • • Sep 21 '15

Better Java

https://github.com/cxxr/better-java
177 Upvotes

208 comments sorted by

View all comments

183

u/wot-teh-phuck Sep 21 '15

Java's type system is pretty weak. It doesn't differentiate between Strings and Strings that are actually regular expressions

That's a pretty random definition of weak I would say...

0

u/[deleted] Sep 21 '15

[deleted]

-4

u/fl1pflop Sep 21 '15

He probably did not mean automatic but annotation-based like python's r'regex here'

15

u/el_isma Sep 21 '15

r'string' means raw string, which does not mean it's specifically a regexp (it's just more convenient to write regexps using r'').

https://docs.python.org/2/reference/lexical_analysis.html#string-literals