Just a short question:
Why white spaces as delimiter / formating in LTSL?
I know it does force to write "nice" code but perosnaly having worked with both Python and C/C++ i prefer the ; and { } Style by far. Especially when you have to programm on different Devices and with different Editors the Whitespaces only make it incredible hard to read Code for me.
When you are lazy and dont use Whitespaces in C/C++ i know it produces ugly and really unreadabkle code, but assuming you do use them the additional ; and { } make it much easier to read then just the Whitespaces.
Furthermore i like to have my own "Style" of Formating code (so some Blocks, some additional Tabs within a block etc. and using Whitespaces as actuall Code permits me from doing so. While a single letter is hardly an intrusion to my "personal" Style.
I know this is just my personal Taste, but I am really interested in other opinions about this and if possible and time permits especially Joshes opinion.
Other thoughts on the pros and cons of LTSL code Style are welcome too
Post
Thu Jul 31, 2014 8:36 am
#2
Re: LTSL - Why Whitespaces?
Unless I'm mistaking, you're free to use either whitespace or parenthesis. You can even mix and match.
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
Post
Thu Jul 31, 2014 8:51 am
#3
Afaik are whitespaces mandatory
Re: LTSL - Why Whitespaces?
Thats not what i read out of the devlogs.Katorone wrote:Unless I'm mistaking, you're free to use either whitespace or parenthesis. You can even mix and match.
Afaik are whitespaces mandatory
Post
Thu Jul 31, 2014 9:34 am
#4
Re: LTSL - Why Whitespaces?
We had a fairly extensive discussion about that over here: viewtopic.php?f=28&t=3302
Might be interesting
Might be interesting
Warning: do not ask about physics unless you really want to know about physics.
The LT IRC / Alternate link || The REKT Wiki || PUDDING
The LT IRC / Alternate link || The REKT Wiki || PUDDING
Post
Thu Jul 31, 2014 11:40 am
#5
Re: LTSL - Why Whitespaces?
Thy, it indeed was very Interesting, and the concerncs i had where very well mentioned in this thread, also it raised even more with the "Syntaxed Comments" thing mentioned on page 5.
Post
Thu Jul 31, 2014 2:30 pm
#6
I expect someone can correct me if I'm wrong about this, but my impression was that parentheses would only help with internal grouping of parameters to functions -- not with scoping of sub-functions within a function.
Or can it? Are sub-functions considered to be and treated as "parameters" to the function that encloses them?
Are these both valid and equivalent:
[Note to mods: Would this thread be worth migrating to the S&M sub-forum?]
Re: LTSL - Why Whitespaces?
Hmmm.Katorone wrote:Unless I'm mistaking, you're free to use either whitespace or parenthesis. You can even mix and match.
I expect someone can correct me if I'm wrong about this, but my impression was that parentheses would only help with internal grouping of parameters to functions -- not with scoping of sub-functions within a function.
Or can it? Are sub-functions considered to be and treated as "parameters" to the function that encloses them?
Are these both valid and equivalent:
Code: Select all
function X (x y z)
Subf1 (x)
Subf2 (y)
Subf3 (z)
Code: Select all
function X (x y z) ((Subf1 (x)) (Subf2 (y)) (Subf3 (z)))
Post
Fri Aug 01, 2014 12:36 am
#7
Re: LTSL - Why Whitespaces?
I think both do work - also dont you have to call the function function ( -.- ) for subfunctions as well?
as in
And shouldnt be:
Possible as well as long as you do not call an actual function but only variables within the function function?
This syntax philosophy is giving me slight headaches currently Hopefully this will get better when we actually can write and test doe ourselfs (i am kind of a "try it and learn" type regarding Programming language Syntax ^^)
P.S.:
I can not tab in this editor -.- So for sharing code on the forum this is really bad
as in
Code: Select all
function NEWFUNCNAME (PARAM1 PARAM2 PARAM3)
function NEWSUBFUNCNAME (PARAM1)
...
Code: Select all
function NAMEPARAM PARAM1 PARAM2 PARAM3
or
function (NAMEPARAM PARAM! PARAM2 PARAM3)
This syntax philosophy is giving me slight headaches currently Hopefully this will get better when we actually can write and test doe ourselfs (i am kind of a "try it and learn" type regarding Programming language Syntax ^^)
P.S.:
I can not tab in this editor -.- So for sharing code on the forum this is really bad