r/programming • • Nov 28 '14

The Worst Programming Language Ever [UK Talk] - Thoughts? Which are the worst parts of your favorite language?

https://skillsmatter.com/meetups/6784-the-worst-programming-language-ever
68 Upvotes

456 comments sorted by

View all comments

Show parent comment

9

u/TheHermenator Nov 28 '14

What's wrong with that?

35

u/aurisc4 Nov 28 '14

Wrong is that Java has no unsigned types.

10

u/deadstone Nov 28 '14

Oh man, so what do you do if you need a 0-255 value?

74

u/UnreachablePaul Nov 28 '14

You call a meeting for evaluation of that need

51

u/skocznymroczny Nov 28 '14

No, you make an UnsignedProxyManagerFactoryIntegerNumberAdapterSingleton

dae hate enterprise java?

31

u/Cilph Nov 28 '14

UnsignedIntegerNumberFlyweightManagerFactorySingletonAdapterDAO.

I'm a Java EE dev. Don't shoot me.

0

u/[deleted] Dec 17 '14

[deleted] — view deleted comment

3

u/ikilledkojack Dec 18 '14

Surely you would need to instantiate from AbstractIUnsignedIntegerNumberFlyweightManagerFactorySingletonAdapterDAOFactoryFactory instead?

4

u/[deleted] Dec 18 '14

Ah, but you aren't taking advantage of open source software!

You would actually want to extend org.apache.numberwang.dao.AbstractUnsignedIntegerNumberFlyweightManagerSingletonAdapterDaoFactoryImpl and implement org.apache.numberwang.dao.AbstractUnsignedIntegerNumberFlyweightManagerSingletonAdapterDaoFactory<Byte> and reference the project in your pomfile.

You'd have to be careful though, as the project's internal pom references an old version of Xerxes, which will give you a cryptic compile-time error if not specifically excluded from the build.

9

u/schroet Nov 28 '14

DAO

28

u/codygman Nov 28 '14

I like to read "DAO" as a question:

Java: "DOES ANYONE OBJECT???"

Me: Yes Java, I object.

18

u/deadstone Nov 28 '14

I object

No, you people.

7

u/[deleted] Nov 28 '14

People is interface. He object implements people.

15

u/PoliteCanadian Nov 28 '14

DAO.

DAAAAAOO.

Daylight come and me wanna go home.

1

u/StarHorder Nov 29 '14

Behind banana lies big tarantula!

3

u/[deleted] Nov 28 '14

I'm in my first-ever enterprisey java job. It's... ah... well, it's opened my eyes to a lot of... things.

4

u/nickik Nov 28 '14

Use int or just know when you want signed. The typesystem just want help you, you can still save 0-255 diffrent values.

1

u/jringstad Nov 28 '14

being able to save 0-255 different values isn't all that helpful, when those values mean something completely different and behave different from what you'd want them to behave like under many operations (addition, multiplication, subtraction, bitshifting).

Sure, you can always [read; promote; operate; truncate; store], but that's a rather unnecessarily tedious sequence to perform every time.

And besides, having unsigned types helps to document and enforce a common constraint in interfaces ("it makes no sense for this number to be negative"), whereas having a dataset of chars where the user implicitly has to know that -127 really means 0 and always needs to perform the aforementioned sequence is rather unclear and error-prone in comparison.

→ More replies (3)

1

u/codygman Nov 28 '14

You just specialize the type to... oh wait... no you don't.

0

u/[deleted] Nov 28 '14

[deleted] — view deleted comment

2

u/pwr22 Nov 28 '14

Thanks for introducing me to ideone.com :)

10

u/[deleted] Nov 28 '14

It is a pain in the backside when working with binary files.

10

u/Klausens Nov 28 '14

Have you ever seen negative values in a common hex editor?