• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 19:11
CET 01:11
KST 09:11
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
[BSL21] Ro.16 Group Stage (C->B->A->D)1Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win2RSL Season 3: RO16 results & RO8 bracket13Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge2[TLMC] Fall/Winter 2025 Ladder Map Rotation14
StarCraft 2
General
When will we find out if there are more tournament Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win SC: Evo Complete - Ranked Ladder OPEN ALPHA Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge RSL Season 3: RO16 results & RO8 bracket
Tourneys
Tenacious Turtle Tussle RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly) Constellation Cup - Main Event - Stellar Fest
Strategy
Ride the Waves in Surf City: Why Surfing Lessons H
Custom Maps
Map Editor closed ?
External Content
Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle soO on: FanTaSy's Potential Return to StarCraft Data analysis on 70 million replays 2v2 maps which are SC2 style with teams together? [BSL21] Ro.16 Group Stage (C->B->A->D)
Tourneys
[BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET [BSL21] GosuLeague T1 Ro16 - Tue & Thu 22:00 CET [Megathread] Daily Proleagues [BSL21] RO16 Tie Breaker - Group A - Sat 21:00 CET
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Should offensive tower rushing be viable in RTS games? Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Clair Obscur - Expedition 33
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine YouTube Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
The Health Impact of Joining…
TrAiDoS
Dyadica Evangelium — Chapt…
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2312 users

TL++ [So much ++ its Meta] - Page 3

Blogs > CecilSunkure
Post a Reply
Prev 1 2 3 All
Meta
Profile Blog Joined June 2003
United States6225 Posts
June 28 2013 21:43 GMT
#41
I'm in favor of TLMeta.
good vibes only
Jacmert
Profile Blog Joined October 2011
Canada1709 Posts
June 28 2013 21:44 GMT
#42
On June 28 2013 22:36 BisuDagger wrote:
Show nested quote +
On June 28 2013 21:24 3FFA wrote:
On June 28 2013 20:52 Burrfoot wrote:
I say TL switches things up and upgrades TL+ to +TL+ or started with TL. And incrementally went to TL.. TL... all the way past 9000.s

Ahh so do something like
    
BOOL newday; //is it a new day? Yes or no answers only.

//other code to define newday would most likely go here.

if(newday = YES) // if it is a new day...
{
double TLplus = 9000; //9000 TL+
for (int TL=1; TL < TLplus; TL++) //endless loop is endless
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //Say hi to R1CH
printf("/n you are now %i R1CH in TL",TL); //TL, new currency.
TLplus ++; //OVER 9000 TL+!
newday = NO; //not a new day anymore :(
return TL; //because why not?
}
}


Show nested quote +
//endless loop is endless

Your loop only runs once.

Ha ha! Good, I'm not crazy. I don't usually code in C++ (I work with a C++ like language), but I was like, "doesn't return break out of the loop?"

And I've NEVER heard/known about i++ returning any value, nor the difference between i++ and ++i. Good to know. Thanks!
Plat Support Main #believe
mizU
Profile Blog Joined April 2010
United States12125 Posts
June 28 2013 22:09 GMT
#43
what da fuk is going on
if happy ever afters did exist <3 @watamizu_
Shana
Profile Blog Joined July 2009
Indonesia1814 Posts
June 28 2013 23:48 GMT
#44
So there will be TL++ soon?
Believing in what lies ahead. | That which we call a rose, by any other name would smell as sweet.
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
Last Edited: 2013-06-29 00:59:41
June 29 2013 00:58 GMT
#45
On June 29 2013 02:44 spinesheath wrote:
Show nested quote +
On June 29 2013 02:12 wherebugsgo wrote:
I really prefer +=. In fact I actually had a stylistic guide in a class once that would not allow you to use the ++ operator. The autochecker for assignments would throw an error until you changed it.

So now instead of

void func(int i) { }
int i = 42;
func(i++);

you always write

void func(int i) { }
int i = 42;
int t;
func((t = i, i += 1, t));

Yes, that's an assignment too, even though there is no = sign in the function call.

Granted, the sequence
vector<int> v(10, 0);
int i = 0;
v[i] = i++;
Can resolve to pretty much anything your compiler wants it to, but is that a reason to avoid ++?

My C++ got really rusty from all that C# lately, geez. Had to look up all of this to make sure I'm not making mistakes...


Actually, I'm almost 100% sure this is exactly why some programmers suggest avoiding ++ and --, because when you use them inline with other things, it tends to confuse people who did not write the code themselves. The professor I had that required += instead of ++ was not the only one who suggested this, though he was the most vocal about it. A few that I've had have said that increment and decrement operators should only be used by themselves on a single line, i.e.


i++;
a[i] = x;


instead of


a[++i] = x;


The fact that you had to look up documentation to see if you were doing everything correctly is another indication that perhaps you should consider simplifying your style, regardless of whether you've spent time programming in C#. Good programming practices lead to simple and readable code. I don't think what you suggested is very simple. Even if it takes more time to write it initially, clean and simple code is much easier and less painful to maintain.

For example, what does this mean?


i = i++ + ++i;


Sometimes with pointer arithmetic in C the increment operators can become really confusing too.

The point is not that you CAN do these things. Sure, you can do them. It doesn't mean you should. I'm personally of the belief that code should not be a labor to read or understand. It's a pain in the ass to debug someone else's code when it's written poorly and not commented.

Then again, maybe I am significantly biased, since the first three languages I learned to program in were Fortran, Scheme, and Python, none of which use the ++ operator. It was only after I used them for 2 years that I moved onto Java and C.
rabidch
Profile Joined January 2010
United States20289 Posts
June 29 2013 01:26 GMT
#46
On June 28 2013 19:20 spinesheath wrote:
The # is actually just two overlapping + signs. So it's C[++ in a single character].

or it could be 4 smaller +s
LiquidDota StaffOnly a true king can play the King.
aNGryaRchon
Profile Joined August 2012
United States438 Posts
June 29 2013 02:39 GMT
#47
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..

Good question
Power overwhelming!!!
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2013-06-29 06:02:12
June 29 2013 06:00 GMT
#48
On June 29 2013 09:58 wherebugsgo wrote:
Show nested quote +
On June 29 2013 02:44 spinesheath wrote:
On June 29 2013 02:12 wherebugsgo wrote:
I really prefer +=. In fact I actually had a stylistic guide in a class once that would not allow you to use the ++ operator. The autochecker for assignments would throw an error until you changed it.

So now instead of

void func(int i) { }
int i = 42;
func(i++);

you always write

void func(int i) { }
int i = 42;
int t;
func((t = i, i += 1, t));

Yes, that's an assignment too, even though there is no = sign in the function call.

Granted, the sequence
vector<int> v(10, 0);
int i = 0;
v[i] = i++;
Can resolve to pretty much anything your compiler wants it to, but is that a reason to avoid ++?

My C++ got really rusty from all that C# lately, geez. Had to look up all of this to make sure I'm not making mistakes...


Actually, I'm almost 100% sure this is exactly why some programmers suggest avoiding ++ and --, because when you use them inline with other things, it tends to confuse people who did not write the code themselves. The professor I had that required += instead of ++ was not the only one who suggested this, though he was the most vocal about it. A few that I've had have said that increment and decrement operators should only be used by themselves on a single line, i.e.


i++;
a[i] = x;


instead of


a[++i] = x;


The fact that you had to look up documentation to see if you were doing everything correctly is another indication that perhaps you should consider simplifying your style, regardless of whether you've spent time programming in C#. Good programming practices lead to simple and readable code. I don't think what you suggested is very simple. Even if it takes more time to write it initially, clean and simple code is much easier and less painful to maintain.

For example, what does this mean?


i = i++ + ++i;


Sometimes with pointer arithmetic in C the increment operators can become really confusing too.

The point is not that you CAN do these things. Sure, you can do them. It doesn't mean you should. I'm personally of the belief that code should not be a labor to read or understand. It's a pain in the ass to debug someone else's code when it's written poorly and not commented.

Then again, maybe I am significantly biased, since the first three languages I learned to program in were Fortran, Scheme, and Python, none of which use the ++ operator. It was only after I used them for 2 years that I moved onto Java and C.

I had to look this stuff up because things like the comma operator are pretty damn exotic and I would never use them in real code unless I had a very specific reason to use it. Also to make sure the example of undefined behavior is actually undefined behavior.
Increment operators are generally fine if you only have a single occurence of the incremented variable in the whole statement and don't have any side effects on the variable. Sure, it means you need to be careful, but in fact compilers should be able to warn you about these things nowadays and I wouldn't give up proper ++ usage (which really is just in cases where it is clear what it does) where appropriate just for a little false security. You're not allowed to be any less careful just because you avoid ++, anyways.
If you have a good reason to disagree with the above, please tell me. Thank you.
Mobius_1
Profile Blog Joined April 2011
United Kingdom2763 Posts
June 29 2013 08:23 GMT
#49
doubleplus? Are we at war with Eastasia or Eurasia?
Starleague Forever. RIP KT Violet~
docvoc
Profile Blog Joined July 2011
United States5491 Posts
June 29 2013 15:38 GMT
#50
On June 28 2013 15:49 CecilSunkure wrote:
u gotta skate

The moral of the story.
User was warned for too many mimes.
Scorpion77
Profile Blog Joined January 2013
98 Posts
June 30 2013 17:41 GMT
#51
idk, this sounds like it would disturb the fabric of the metagame
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2013-06-30 22:29:28
June 30 2013 22:27 GMT
#52
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..

=.=

-removed comment-
There is no one like you in the universe.
MaGariShun
Profile Joined May 2010
Austria305 Posts
July 01 2013 15:28 GMT
#53
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..

Because calling it 'Java' would have been to obvious of a ripoff
XCetron
Profile Joined November 2006
5226 Posts
July 01 2013 16:15 GMT
#54
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..

[image loading]
Rayeth
Profile Blog Joined April 2010
United States883 Posts
July 01 2013 21:07 GMT
#55
On June 29 2013 09:58 wherebugsgo wrote:


For example, what does this mean?


i = i++ + ++i;


Sometimes with pointer arithmetic in C the increment operators can become really confusing too.

The point is not that you CAN do these things. Sure, you can do them. It doesn't mean you should. I'm personally of the belief that code should not be a labor to read or understand. It's a pain in the ass to debug someone else's code when it's written poorly and not commented.


I can show off my knowledge of old languages, whee!


i = i++ + ++i;

This is straight up undefined behavior by the C standard. I don't know about C++ or C# (as I don't use them), but the C standard says this will lead to undefined behavior. You are using the ++ operator in such a way as to make its use dependant on what the compiler chooses to do first. It is equally undefined to say:

u = u++;


Now something will happen, but what you get is dependent on what system, what compiler and who knows how many other variables. The correct way to write the above would simply be u++;

The technical reason for these being incorrect is that you are modifying the stored value more than once between sequence points. As for what a sequence point is refer to the Wikipedia article as it is much clearer than I could ever be. The end result here is that you are right. No one should ever use expressions like that. They are sometimes used in classrooms to demonstrate bad code for a reason!

I will disagree with you about the pointers though. Yes bad code can be created using silly means, but a competent coder should not fear to use pointers. They are really useful! Don't shy away from such a powerful tool because they can be confusing, just make sure you are not the one writing the bad code. =)
The Innocent shall suffer... big time.
Targe
Profile Blog Joined February 2012
United Kingdom14103 Posts
July 01 2013 22:26 GMT
#56
u gotta skate

+ Show Spoiler +
this thread hurts my head
11/5/14 CATACLYSM | The South West's worst Falco main
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
July 02 2013 01:00 GMT
#57
On July 02 2013 07:26 Targe wrote:
u gotta skate

hahaha, I wonder if anyone got the baller reference in there too
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
Last Edited: 2013-07-06 01:17:43
July 06 2013 01:13 GMT
#58
On July 02 2013 06:07 Rayeth wrote:
Show nested quote +
On June 29 2013 09:58 wherebugsgo wrote:


For example, what does this mean?


i = i++ + ++i;


Sometimes with pointer arithmetic in C the increment operators can become really confusing too.

The point is not that you CAN do these things. Sure, you can do them. It doesn't mean you should. I'm personally of the belief that code should not be a labor to read or understand. It's a pain in the ass to debug someone else's code when it's written poorly and not commented.


I can show off my knowledge of old languages, whee!


i = i++ + ++i;

This is straight up undefined behavior by the C standard. I don't know about C++ or C# (as I don't use them), but the C standard says this will lead to undefined behavior. You are using the ++ operator in such a way as to make its use dependant on what the compiler chooses to do first. It is equally undefined to say:

u = u++;


Now something will happen, but what you get is dependent on what system, what compiler and who knows how many other variables. The correct way to write the above would simply be u++;

The technical reason for these being incorrect is that you are modifying the stored value more than once between sequence points. As for what a sequence point is refer to the Wikipedia article as it is much clearer than I could ever be. The end result here is that you are right. No one should ever use expressions like that. They are sometimes used in classrooms to demonstrate bad code for a reason!

I will disagree with you about the pointers though. Yes bad code can be created using silly means, but a competent coder should not fear to use pointers. They are really useful! Don't shy away from such a powerful tool because they can be confusing, just make sure you are not the one writing the bad code. =)


I never once said that a good programmer should not use pointers. I use pointers all the time, I just don't necessarily increment them using ++.

edit: btw, I used those examples because I've actually seen them in codebases.

yep, that's right. I have seen real code written by real people that looks that confusing.
Prev 1 2 3 All
Please log in or register to reply.
Live Events Refresh
Next event in 49m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
elazer 267
Nathanias 80
CosmosSc2 51
StarCraft: Brood War
Bisu 1429
Artosis 591
Hyun 149
ZZZero.O 101
ggaemo 24
NaDa 14
Dota 2
syndereN310
Counter-Strike
Foxcn148
Fnx 70
minikerr25
Super Smash Bros
PPMD29
Other Games
Grubby3249
summit1g2821
Day[9].tv176
ViBE151
Maynarde110
Trikslyr53
C9.Mang037
Organizations
Other Games
gamesdonequick233
Dota 2
PGL Dota 2 - Main Stream179
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 21 non-featured ]
StarCraft 2
• Hupsaiya 85
• davetesta39
• musti20045 32
• Kozan
• Migwel
• sooper7s
• AfreecaTV YouTube
• intothetv
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• blackmanpl 25
• mYiSmile16
• Pr0nogo 1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Doublelift4261
Other Games
• Scarra1248
• imaqtpie1244
• Shiphtur396
• Day9tv176
Upcoming Events
PiGosaur Cup
49m
Replay Cast
8h 49m
Wardi Open
11h 49m
OSC
12h 49m
Tenacious Turtle Tussle
23h 49m
The PondCast
1d 9h
Replay Cast
1d 22h
OSC
2 days
LAN Event
2 days
Replay Cast
2 days
[ Show More ]
Replay Cast
3 days
WardiTV Korean Royale
3 days
Sparkling Tuna Cup
4 days
WardiTV Korean Royale
4 days
Replay Cast
4 days
Wardi Open
5 days
Monday Night Weeklies
5 days
Replay Cast
5 days
Wardi Open
6 days
Liquipedia Results

Completed

SOOP Univ League 2025
RSL Revival: Season 3
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
META Madness #9
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.