Camen Design Forum

"Web Languages" Pet Peeves

JJ

Johann, I know where you're coming from. I used to code like that when I started using PHP, but after I used another language without curly braces for a while, I realized there is no way to replicate the "curly brace on the next line" habit: e.g.

if a == 1 then
print("hello world")
end

So when I started coding with PHP again, in an effort to keep a consistent coding habit, I started putting the curly brace right next to the function declaration.

Another thing...this is going to be a preemptive defense of myself because I know someone is going to call it out as one of their annoyances. So I'm just going to say it: I prefer using character entities over actual unicode characters in my markup. Why? I don't know. I have no logical argument in favor of it. I just feel cleaner using all ascii in my markup. I've always been this way.

Append

(Leave this as-is, it’s a trap!)

Only the original author or a moderator can append to this post.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn