• Print

Author Topic: Garry strongly recommends against using default lua syntax, UWE follows garry  (Read 19 times)

0 Members and 1 Guest are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
I randomly came across this link today and was surprised to see that not only does garry support keywords and comments that are not portable (as we've known...), he strongly recommends programmers to not use the "old", more compatible style. (That's his wording, you can see in the history of the page edits)

My stance has always been that this is an all-around bad idea, since it breaks portability (including the ability to test your code easily outside gmod) and almost all editors. I was disheartened to see that Unknown Worlds Entertainment (UWE), my favorite game development company, follows in garry's footsteps by supporting and using c-style comments through all their code for Natural Selection 2.

Is it really so hard to conform to the language's standards? Am I the only one who thinks this is a bad idea?

Also, the forum's been quite for over 24 hours, I had to post something to liven up the conversation. :)
« Last Edit: April 13, 2010, 03:47:53 pm by Megiddo »
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Is it really so hard to conform to the language's standards? Am I the only one who thinks this is a bad idea?
I agree that portability of any language should be possible.
Lua isn't that difficult to NOT try to do other language like structure and comments.


Also, the forum's been quite for over 24 hours, I had to post something to liven up the conversation. :)

Pssst...Megiddo... look out your window.
I don't know about you, but... after a long cold winter, several weeks of rain... the weather here has been absolutely gorgeous.
Though I am now sore from the gardening I did this weekend. Sitting still makes my muscles grow stiff.

Now, run along, go play frisbee/football/golf/any other outdoor recreation or combo there-of.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Pssst...Megiddo... look out your window.

Window? You mean that thing that keeps letting light into my room? That's cordoned off for a reason!
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
I certainly agree about the compatibility part of the lua discussion, however, maybe it's time for a change in the syntax. Obviously there is a better way to do it if so many developers are jumping on this custom syntax bandwagon. Of course this would require a major overhaul of the language base.. maybe just an update to allow both methods across the board.

Personally I'd just assume do it the way it was intended.. Whats so hard about doing this...

--Oh my gosh..
--I can't have multiline commenting support...
--But this is just as easy!!! >.<

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Heh.
Stupidly simple awesome-to-me tip I found using Google.

Code: [Select]
local _
_=[[
This is a multiline
block comment
]]
function blah()
end
_=[[
This is a multiline
block comment2
]]
function blah2()
end

_=nil
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Heh.
Stupidly simple awesome-to-me tip I found using Google.

Code: [Select]
local _
_=[[
This is a multiline
block comment
]]
function blah()
end
_=[[
This is a multiline
block comment2
]]
function blah2()
end

_=nil

Agh! Agh!

* Megiddo chokes and dies
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
See...it's so awesome it shocked Megiddo to death.
*grin*
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
haha-- I don't mind the lua syntax at all.. every so often I catch myself using ! or //, but.. honestly I don't know why it bothers people :P, you have to learn a bunch of new stuff per language anyways..
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

  • Print