It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
Alaric.us: I played with TS quite a bit, but didn't like it. ...
Then again, though, there's a ton of atrocious Java, C#, and C++ code as well. =)
TS: Tastes differ I guess. I was sceptical at first too, but I had to use it (job requirement) and I actually came to love it.

Atrocious code: Word! And with C++ you can do real damage too ;-)
Also there is a language where all code is atrocious, just in varying degrees: PHP... I know it, because I've used it for more than 15 years professionally...
avatar
toxicTom: TS: Tastes differ I guess. I was sceptical at first too, but I had to use it (job requirement) and I actually came to love it.
I used it for about 6 months at my previous job. It's not the end of the world by any means, but felt like too much boilerplate and effort for very little gain. Because of that I was very strongly against adopting it at my current company.

avatar
toxicTom: Atrocious code: Word! And with C++ you can do real damage too ;-)
Also there is a language where all code is atrocious, just in varying degrees: PHP... I know it, because I've used it for more than 15 years professionally...
Ugh. I'm very sorry you had to deal with PHP. I looked into it once, and my beard has been gray ever since. Then again, my first server side tech was classic ASP, so... yeah.

Oh and C++ is a lot more messed up than most people know. Somehow it's got the reputation for being the perfect language, but not only can you do damage, the amount of WTFs rivals that of JS, except they are much better hidden.

Check this out:

int i = 5;
i = ++i + ++i;

What does i equal to?
Post edited May 13, 2018 by Alaric.us
avatar
Alaric.us: Check this out:

int i = 5;
i = ++i + ++i;

What does i equal to?
Should be 13 by logic. Probably wrong ;-)

PS: Here's a JS one:

Array(16).join( 'hero'-1) + "Batman" = ?
Post edited May 13, 2018 by toxicTom
avatar
toxicTom: Should be 13 by logic. Probably wrong ;-)
Yes it should be. And yes it's wrong.

It could return 13. It could also return 14. Since the order of operations is not actually defined in the language's specification, the correct answer is "Undefined Behavior." Since the compiler is free to process the operations in any order that's convenient for it at any given moment, both of these (or any other) interpretations are equally and fully valid:

tmp=i; tmp++; i = tmp; tmp++; i += tmp;

tmp=i; tmp++; tmp++; i = tmp + tmp;

So yea. JS has its own share of WTFs, but this one trumps them all I think. =)
avatar
toxicTom: Array(16).join( 'hero'-1) + "Batman" = ?
You shouldn't be able to do this. 'hero'-1 is gonna be a NaN.

Oh! Ahaha! Took me a moment.
Post edited May 14, 2018 by Alaric.us
avatar
Alaric.us: Oh! Ahaha! Took me a moment.
That one always brings a smile to my face :-)
avatar
Tauto: Ironic,give something away and become Mr Popular.yuk yuk yuk.
avatar
Alaric.us: LOL, yea, I'm practically a superstar. Probably lost less than 10 points of rep today — unheard of! :D
Lots of laughs.
Good! Let me try! ;)
avatar
enpy: Good! Let me try! ;)
Sent! =)

On this happy note I'm off to sleep. Will check the thread tomorrow in case anyone else wants a key. Cheers!
Post edited May 14, 2018 by Alaric.us
avatar
Alaric.us: Hey, guys and girls, would anyone like a key to my crappy indie game on Steam?
Would like a key to try the game, please. Very generous of you, much appreciated. :-)
2017 was the year of my clicker obsession, whereas 2018 is back to dungeon crawler obsession, but I'd still be interested in trying it out if you still have a few left.

thanks!
avatar
toxicTom: PS: Here's a JS one:

Array(16).join( 'hero'-1) + "Batman" = ?
Sandwich?
avatar
Alaric.us: Oh and C++ is a lot more messed up than most people know. Somehow it's got the reputation for being the perfect language, but not only can you do damage, the amount of WTFs rivals that of JS, except they are much better hidden.

Check this out:

int i = 5;
i = ++i + ++i;

What does i equal to?
That's not the only problem with C++.

One problem that can come up in both C and C++ is the following:

int *func(void)
{
int x = 3;
return &x;
}

(If you try to compile this code, you might get a compiler warning; there is a good reason for that.)

Can you see why that program is bad? (If you try to write the equivalent in save Rust, you will get an error to the effect of "x does not live long enough.)

Another problem would be the following (and I think this might affect JavaScript, but I am not sure):
int func(int x)
{
if (x = 0) {
puts("No, I will *not* divide by zero; you can't make me.");
abort();
} else {
return 60 / x;
}
}

If you want a language that can fill C and C++'s niche, but has fewer issues like these, I would recommend looking into Rust; it enforces memory safety but has an escape hatch ("unsafe") if you need it.

(By the way, the game being Steam only is a dealbreaker for me, as well as the game requiring a higher resolution than my monitor's 1280x1024.)
avatar
Themken: Cheap or old laptops may have lower.
As well as cheap new laptops. There are still plenty with 1366 x 768 resolution.
Post edited May 14, 2018 by Mr.Mumbles
Seems neat, I'd like to try it. Thanks!
avatar
ZenWan: Would like a key to try the game, please. Very generous of you, much appreciated. :-)
Sent! =)
avatar
bler144: 2017 was the year of my clicker obsession, whereas 2018 is back to dungeon crawler obsession, but I'd still be interested in trying it out if you still have a few left.

thanks!
Sent! =)
avatar
itchanddino: Seems neat, I'd like to try it. Thanks!
Sent! =)

avatar
dtgreene: Another problem would be the following (and I think this might affect JavaScript, but I am not sure):
int func(int x)
{
if (x = 0) {
puts("No, I will *not* divide by zero; you can't make me.");
abort();
} else {
return 60 / x;
}
}
JS has has both positive and negative Infinity, so division by zero is allowed. Take a look at the screenshot.
Attachments:
Post edited May 14, 2018 by Alaric.us