|
| 25 Feb 2016 11:02 PM |
Not really a lua question, but has anyone noticed the way methods are set up in other languages? Whenever I see any code from others or I use the pre-generated stuff, they always space methods like this:
int main() { return 0; }
So I was wondering if I was the only one that hated it and how you guys space it out. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 25 Feb 2016 11:04 PM |
| I never put a brace on its own line, but it's preference. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2016 11:07 PM |
lua is a high-level coding language and thus very easy to learn and use, but also takes more processing space.
Java, which is the language you are using as an example, is a lowerish-level language. Which means it's harder to learn and use yet uses up less processing space.
It seems harder to use because it's getting closer to the language a computer uses, which is very hard to understand. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 25 Feb 2016 11:09 PM |
An open-brace*
wolfbane what you said was irrelevant to this thread, just so you know.
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 25 Feb 2016 11:09 PM |
| And his example is definitely not in Java, it's most likely C/C++ |
|
|
| Report Abuse |
|
|
tedrin70
|
  |
| Joined: 09 Nov 2012 |
| Total Posts: 603 |
|
|
| 25 Feb 2016 11:20 PM |
| I personaly keep all my code really close together, I never space out my lines. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 25 Feb 2016 11:30 PM |
I prefer:
int main(){ return 0; }
|
|
|
| Report Abuse |
|
|
|
| 25 Feb 2016 11:31 PM |
I keep it like you said it int main() { return 0; }
It makes it so much easier to see if you are missing a brace or not |
|
|
| Report Abuse |
|
|
tedrin70
|
  |
| Joined: 09 Nov 2012 |
| Total Posts: 603 |
|
| |
|
|
| 18 Mar 2016 01:26 PM |
This got booted way down my list of threads >.> Glad to see I'm not the only one who doesn't space their code like that.
And yeah I was using C++ as an example =P Cool that chimmihc replied tho. That's one off the bucket list. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2016 01:27 PM |
and cntkillme
two off the bucket list. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2016 01:28 PM |
I prefer it like @chim.
int main() { return 0; };
Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784 |
|
|
| Report Abuse |
|
|
LTB4
|
  |
| Joined: 05 Mar 2016 |
| Total Posts: 298 |
|
|
| 18 Mar 2016 01:30 PM |
int main() { //Code here return 0; }
#code --[[LTB4]] | return [[std::cout << "I am the best at C++!" << endl;]] |
|
|
| Report Abuse |
|
|
tedrin70
|
  |
| Joined: 09 Nov 2012 |
| Total Posts: 603 |
|
|
| 18 Mar 2016 04:17 PM |
| We got the point out it's time to stop bumping this thread. |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2016 05:31 PM |
| "};" lmao you never fail to disappoint kek |
|
|
| Report Abuse |
|
|