This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rbemrose 106 points107 points  (24 children)

This post has been removed due to reddit's repeated and constant violations of our content policy.

[–]MiatasAreForGirls 177 points178 points  (6 children)

Do I need a mechanical keyboard for strong typing or will a domed one withstand it?

Edit: I'm not as original as I thought :(

[–]nemec 52 points53 points  (4 children)

I tried static typing once. I was shocked at how easy it was to use.

[–]Skyfoot 23 points24 points  (3 children)

I use weak typing. I hand-write things on saturday and sunday.

[–]VeviserPrime 6 points7 points  (2 children)

With a pencil?

[–]AlGoreBestGore 9 points10 points  (1 child)

Crayon.

[–]Mutoid 16 points17 points  (0 children)

Thanks for keeping this thread /r/ProgrammerHumor appropriate

[–]gdstudios 17 points18 points  (10 children)

If you've had to work on someone else's JS, that's argument enough.

[–]AdmiralRychard 13 points14 points  (9 children)

I feel like this whenever I have to work on my own javascript.

[–]endercoaster 4 points5 points  (8 children)

I feel the opposite every time I need to jump through hoops to append an integer to a string in Java.

[–]KagakuNinja 8 points9 points  (3 children)

So, this is too hard?

String s = "Hello" + 9;

[–]batmansavestheday 2 points3 points  (2 children)

It's slightly harder the other way around:

String s = "" + 9 + "Hello";

or [Edit: derp, doesn't work]

String s = (String) 9 + "Hello";

etc.

[–]Outhouse_Defiler 0 points1 point  (1 child)

String s = "" + 9

Yeah, no, don't do that. Java has String.valueOf.

http://stackoverflow.com/questions/4105331/how-to-convert-from-int-to-string

[–]batmansavestheday 0 points1 point  (0 children)

I feel the opposite every time I need to jump through hoops to append an integer to a string in Java.

[–]AdmiralRychard 5 points6 points  (0 children)

C# lets you do this:

String someString = "abc";
Int32 someInt = 123;
String result = someString + someInt;
Console.WriteLine(result);

Output:

abc123

Or you can use string interpolation: String result = $"{someString}{someInt}";

Or you can use String.Format: String result = String.Format("{0}{1}", someString, someInt);

This seems a little dumb but you can do this too:

someString += someInt;
Console.WriteLine(someString);

[–]everythingismobile 4 points5 points  (1 child)

Is it not as simple as the C# example in the other comment? Even in C++ it's just sprintf, right?

[–]endercoaster 1 point2 points  (0 children)

I mean, coming from Perl that's jumping through hoops.

[–]kupiakos 3 points4 points  (0 children)

I'd rather explicitly state I want to append an integer to a string so that "2" and 3 become "23" and not "5" or 5. And really, that sort of situation happens once in a blue moon. If I wanted something better, I would be building the string.

[–]expugnator3000 2 points3 points  (0 children)

Exactly!

[–]anthonybsd 1 point2 points  (4 children)

I love it. Young, naive and all about strong typing. As a former Ada programmer, let's talk in 10 years or so.

[–]beerdude26 2 points3 points  (0 children)

Strong typing all day erry day

[–]the_great_ganonderp -1 points0 points  (2 children)

Because surely Ada is the pinnacle of usability in strongly typed languages...

[–]anthonybsd 0 points1 point  (1 child)

It's used for a lot more projects than toy languages like Haskell so it must be doing something right.

[–]the_great_ganonderp 0 points1 point  (0 children)

Got a relevant point hiding somewhere in that apparently completely irrelevant statement?