News for hackers. Stuff that matters.
Re:SQL Notebook by awkwardtortoise on Tuesday May 09, 2017 @04:32PM (#14303560)
> I think he's referring to the terrible terrible terrible procedural components of T-SQL - cursors, local variables, IF/THEN control blocks, etc.

Sure. It also has stored procedures/functions/etc. But just because it has elements of imperative->procedural language doesn't mean it is a procedural language. No more than C#'s LINQ implementations mean C# is a declarative language or lambda expressions means it is a functional language.

And though I'm not of a fan of cursors, it is a legacy of a time when it was somewhat needed. And nothing about local variables/controls/etc makes T-SQL "terrible".

All of it is necessary for database maintenance, t-sql programming, etc.

Re:SQL Notebook by Pxtl on Tuesday May 09, 2017 @05:27PM (#14303944)
> And nothing about local variables/controls/etc makes T-SQL "terrible".

Compared to a full-featured programming language? It's good for its intent, which is to provide a minimal bit of procedural scaffolding for scripts that alter the database. It is terrible as a general-purpose procedural programming language, and I've worked with too much horrifying T-SQL and PL/SQL that pushes these tools way too far out of their intended workflow.

Yes, T-SQL is predominantely a declarative language. But it includes procedural components for writing procedural scripts. And unless we're talking about maintenance scripts or deployment scripts, don't use them.

Re:SQL Notebook by ianamartin on Wednesday May 10, 2017 @03:16AM (#14306423)
You just need to calm down. Everyone here has spent a certain amount of time dealing with shitty code.

That's all you're really claiming here. That some people write shitty code. And I agree. I've spent plenty of time with almost every flavor of SQL code that was incredibly shitty.

But I don't really blame the languages that much. I blame the people who didn't understand when and where to use one language or another.

And frankly, if you're seriously going to complain about T-SQL vs other "more full featured programming languages" and then make a blanket statement about not using any procedural components on SQL flavors . . . ummm, you might be your own worst enemy here.

Re:SQL Notebook by Pxtl on Wednesday May 10, 2017 @07:31AM (#14307392)
> You just need to calm down.

You just said "I would shit a brick and beat a developer" upthread.