|
Nmap Development
mailing list archives
Re: [Lua snippit] print_hex
From: Ron <ron () skullsecurity net>
Date: Sun, 07 Sep 2008 22:51:32 -0500
Kris Katterjohn wrote:
Patrick Donnelly wrote:
I'm pretty sure Brandon, I and others have brought this up in the past, but it
would be awesome to have a "Best Practices" section (short is fine) in the
Nmap docs/book somewhere on Lua coding, and any gotchas that could get us who
come from many other languages (I think most people here learned Lua solely
for NSE... I know I did). I know Brandon recently posted a link on learning
Lua from a Perl background, but I've never been much of a Perl guy.
I agree that a best practices or style guide of some kind would be
handy. While writing a script, there were a few times when I wasn't sure
what the proper style was. Here are some thoughts I had while I was writing:
- Tab indenting or spaces? If spaces, how many?
- Should there be a maximum line length?
- Is it better to use, for example, str:len() or string.length(str)?
When is one preferred?
Among other things.
Thankfully, Lua doesn't have braces so I don't have to be upset at
people who put their braces in the clearly wrong place (you know where
they ought to be)! :)
Ron
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
By Date
By Thread
Current thread:
|