Code: Select all
# This is a comment
Code: Select all
# (This is also a comment)
Code: Select all
# This
entire block
is a comment!
Code: Select all
# This is a comment
Code: Select all
# (This is also a comment)
Code: Select all
# This
entire block
is a comment!
Code: Select all
# is this
still a comment?
Code: Select all
#can this
still be a comment, or is
it a predefined number of spaces
I like the vim default 8 spaces
He uses Vim, but since that is open source, he might be able to include it.FormalMoss wrote:Also, I know Josh uses a cool custom IDE for coding...
Code: Select all
# is this
still a comment?
Code: Select all
# is this
still a comment?
No way! That won't get compiled into the runtime code - just like a comment in c++, it will be ignored completely by the compilerCornflakes_91 wrote:ironically, this could cause performance problems
If comments work the way i think they work they are just a special function call.
A call to NOP which gets the comment text as parameter and does simply nothing with it.
So when you start to comment out 50% of your lines you have 50% redundant function calls.
Lightweight function calls, true, but still a ton of unneeded function calls.
If you have a big script with many comments it could be that you get a performance increase when removing the comments or optimising the comment calls...
Code: Select all
# inline when i have single-line comments
#
as delimiting blocks
With multi line
Comments
#
That thought occurred to me as well. I'm able to tell my preferred editor, ZEUS, for example, how to colorize comments delimited by // and /* */ for languages that impose scoping through explicit characters.Cornflakes_91 wrote:Maybe the in-engine text editor could color comments differently
(Im assuming that there will be an in-game editot)
This only shows that using invisible characters for scoping is a poor design choice .Flatfingers wrote:I suspect the answer is no. That second line would be a "live" statement.Code: Select all
# is this still a comment?
But all of this would be a comment:
Code: Select all
# is this still a comment?
Code: Select all
# comment
Comment with two spaces
Comment with three spaces -> comment?
Back with two spaces -> comment?
Only one space -> comment?
YESS, this is what I was referring to..Cornflakes_91 wrote:Maybe the in-engine text editor could color comments differently
That isn't an in-engine editor (at least it doesn't appear to be) - that's Vim. Unless you're saying he's switched from Vim to something else...FormalMoss wrote:YESS, this is what I was referring to..Cornflakes_91 wrote:Maybe the in-engine text editor could color comments differently
.. this took me an age to find, but here's what I'm referring to: Together with some other examples: and Considering that Josh is using a new file editor (forgotten its name), and showed us multiple windows from within LT itself, wouldn't it be so cool to be editing scripts from within LTSL within LT?
Users browsing this forum: No registered users and 7 guests