Monday 8 September 2014

Hungarian notation for variables

So I've been playing with functional programming for a week or so and I'm getting somewhat lost with Scala's use of var (something I use all the time with JavaScript and something I keep writing in PHP ;-)) and val. I generally love that both JavaScript and PHP aren't strongly-typed but while I'm learning other things I guessed that it's be better to have a general idea about the type of values held by a variable. Then I clocked that Medhi had sent me something he'd found a couple of weeks ago. Brilliant!

n
Variable represents a node.
o
Variable represents an object.
a
Variable represents an array.
s
variable is a string.
b
Boolean.
f
Float.
i
Variable holds an integer value.
fn
Variable represents a function.

I'm putting it up here as a reference.

No comments:

Post a Comment