0

Why is doing

<%
    if(blahblah)
    {
        //do something
    }
%>

in a JSP considered to be bad practice when noone who writes PHP seems to have any problem with doing essentially the exact same thing?

<?php
    if(blahblah)
    {
        //do something
    }
?>

I don't understand why people are going out of their way to make tag libraries for JSP because scriptlets are considered bad practice when other languages use their own version of "scriptlets" and seem to be much more popular.

xcdemon05
  • 109
  • 1
  • 8
    Well, maybe this is one of those very rare cases where what PHP programmers do is not exactly the pinnacle of software engineering best practice. Shocking, I know. – Jörg W Mittag Aug 07 '15 at 16:17
  • It's just odd to me and I'm wondering if there's some internal difference that is actually significant or something. – xcdemon05 Aug 07 '15 at 16:55
  • @xcdemom05 no, there's no technological difference. It's just that developers who would rather avoid them (and there are good reasons for doing so) tend to also want to avoid PHP (largely, but not exclusively, because they are so common there). – Jules Aug 07 '15 at 20:31

0 Answers0