[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Lua ➜ Struggling.

Struggling.

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #15 on Sat 28 Aug 2010 03:28 AM (UTC)

Amended on Sat 28 Aug 2010 03:36 AM (UTC) by Twisol

Message
WillFa said:
That's what I said...

I know it is. I just disagree that it needed to be said.

WillFa said:
I don't agree with your insinuation that it's "grandfathered". It was a deliberate choice and I've never read anything suggesting that if they had the choice to make all over again, they wouldn't make the same one. I don't think it's so exceptional when 95% of all Lua code I've read or written starts with it. (require "foo")

The table-literal calling shorthand came from SOL, Lua's predecessor. The semantics changed from "defining a record" to "calling a function with this table", but the syntax remained. http://www.lua.org/history.html

I can't find anything about the string-literal calling shorthand.

I'm not saying these things shouldn't exist, nor am I saying they shouldn't be taught. I'm saying the universal way should be taught first. And please; I never said foo{} and foo"" didn't work, I expressly didn't mention them. I wanted to solve the problem, and give a syntax that they can use anywhere.

WillFa said:
You're fixing mistakes that aren't mistakes.

Same to you. :)


[EDIT] Just so you know, I only responded to your original point because you aimed it specifically at what I had said (or rather, hadn't said). I don't care if you say it or not, but don't make me look ignorant. I do a good enough job of that on my own :P

[EDIT] For the sake of the OP, this marks my last post on the subject. I think we both understand eachother at this point, and I don't like arguments :S

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #16 on Sat 28 Aug 2010 04:12 AM (UTC)
Message
If I could just clarify something here... In my experience as a consultant, I get to deal with different classes of people, whether the "Suits", the Programmers, or the IT staff. When talking to them, you need to have some frame of reference so everyone's "on the same page" and "speaking the same language" and communicating effectively.

When dealing with the computer types, the common jargon seems to sprout from the RFCs. When reading the RFCs, the language is very specific on what verbs to use, and when.

If "must" or "need" is used, it is a requirement for the implementation.
"Should" denotes something that's strongly recommended.
"May" is optional.


Perhaps I over-reacted to reading your quote, and I just wanted to clarify it for the other Geeky RFC minded people out there.

In this context: "You need to use \[this format]" Is inaccurate, because that format isn't an absolute requirement. (And if it was a requirement to use parens, then the string/table scenario can't work.)

So, in RFC-speak:
You SHOULD use the form:
Func(param, param2)
unless you're passing 1 param and that parameter is a literal string or table, which you MAY use the form:
Func "param"
or
Func {param}



So, this whole 'argument' is because the word "need" has very specific and absolute meaning to me and some other people. :)

Pedantic? Yea... but we're talking about code. And that brings up the old joke

"This stupid computer doesn't do what I want it to. It only does what I tell it to!"



I apologize for any hurt feelings and ruffled feathers. :)
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #17 on Sat 28 Aug 2010 04:16 AM (UTC)
Message
Hehe, okay, I see where you're coming from now. I am, unfortunately, not as precise as you are in your terminology. My "you need to" is not an absolute, but is relative to what is already present. I don't read RFCs very often, but I know that they try to nail things down exactly. You sometimes need to understand the origin of the "exact" terminology to know what the specific meaning is, though. I just try to explain things as easily to understand as possible. Colloquially, you might say.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


49,915 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]